Compare commits
No commits in common. "1a1bbd083875ad62f46a69ecce658937795ee045" and "70f4601aa9c3704f69fc22fb83611da6eb291a7b" have entirely different histories.
1a1bbd0838
...
70f4601aa9
5 changed files with 22 additions and 26 deletions
|
|
@ -439,7 +439,7 @@ void BackupDialog::on_btnStart_clicked()
|
||||||
QSettings user_settings; // Default constructor is for UserScope
|
QSettings user_settings; // Default constructor is for UserScope
|
||||||
QVariant var = user_settings.value("pg_tools_path", {});
|
QVariant var = user_settings.value("pg_tools_path", {});
|
||||||
QDir dir;
|
QDir dir;
|
||||||
if (var.typeId() == QMetaType::QString) {
|
if (var.type() == QMetaType::QString) {
|
||||||
dir.setPath(var.toString());
|
dir.setPath(var.toString());
|
||||||
}
|
}
|
||||||
if (!dir.exists() || !dir.exists("pg_dump.exe")) {
|
if (!dir.exists() || !dir.exists("pg_dump.exe")) {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
set(PGLAB_SOURCES
|
set(PGLAB_SOURCES
|
||||||
|
main.cpp
|
||||||
About.cpp
|
About.cpp
|
||||||
catalog/delegates/IconColumnDelegate.cpp
|
catalog/delegates/IconColumnDelegate.cpp
|
||||||
catalog/models/BaseTableModel.cpp
|
catalog/models/BaseTableModel.cpp
|
||||||
|
|
@ -84,16 +85,18 @@ set(PGLAB_FORMS
|
||||||
CodeGenerator.ui
|
CodeGenerator.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(pglabapp STATIC
|
add_executable(pglab
|
||||||
${PGLAB_SOURCES}
|
${PGLAB_SOURCES}
|
||||||
${PGLAB_FORMS}
|
${PGLAB_FORMS}
|
||||||
|
resources.qrc
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(pglabapp PUBLIC ws2_32)
|
set_target_properties(pglab PROPERTIES WIN32_EXECUTABLE ON)
|
||||||
|
target_link_libraries(pglab PRIVATE ws2_32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(pglabapp PUBLIC
|
target_link_libraries(pglab PRIVATE
|
||||||
pglablib
|
pglablib
|
||||||
pgsql
|
pgsql
|
||||||
core
|
core
|
||||||
|
|
@ -104,27 +107,10 @@ target_link_libraries(pglabapp PUBLIC
|
||||||
Qt6::Concurrent
|
Qt6::Concurrent
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(pglabapp PUBLIC
|
target_include_directories(pglab PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/crud
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(pglabapp PROPERTIES
|
|
||||||
CXX_STANDARD 20
|
|
||||||
CXX_STANDARD_REQUIRED ON
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(pglab
|
|
||||||
main.cpp
|
|
||||||
resources.qrc
|
|
||||||
)
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
set_target_properties(pglab PROPERTIES WIN32_EXECUTABLE ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(pglab PRIVATE pglabapp)
|
|
||||||
|
|
||||||
set_target_properties(pglab PROPERTIES
|
set_target_properties(pglab PROPERTIES
|
||||||
CXX_STANDARD 20
|
CXX_STANDARD 20
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ void PgSequenceContainer::loadAll(Pgsql::Connection &conn)
|
||||||
q += ", start_value, increment_by, max_value, \n"
|
q += ", start_value, increment_by, max_value, \n"
|
||||||
" min_value, cache_value, is_cycled";
|
" min_value, cache_value, is_cycled";
|
||||||
}
|
}
|
||||||
q += "\nFROM " + std::string(fqn.data(), static_cast<size_t>(fqn.size()));
|
q += "\nFROM " + std::string(fqn.data(), static_cast<size_t>(fqn.count()));
|
||||||
auto && res = conn.query(q.c_str());
|
auto && res = conn.query(q.c_str());
|
||||||
if (res.rows() == 1) {
|
if (res.rows() == 1) {
|
||||||
Pgsql::Row row(res, 0);
|
Pgsql::Row row(res, 0);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
#include <gmock/gmock-matchers.h>
|
#include <gmock/gmock-matchers.h>
|
||||||
#include "Pgsql_Value.h"
|
#include "Pgsql_Value.h"
|
||||||
#include "PrintTo_Qt.h"
|
#include "PrintTo_Qt.h"
|
||||||
#include <QTimeZone>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
@ -30,7 +29,7 @@ TEST(Pgsql_Value, test_QDateTime_2)
|
||||||
Pgsql::Value v("2017-12-01 09:38:17.339817+02", timestamptz_oid);
|
Pgsql::Value v("2017-12-01 09:38:17.339817+02", timestamptz_oid);
|
||||||
QDateTime dt = (QDateTime)v;
|
QDateTime dt = (QDateTime)v;
|
||||||
QDateTime exp(QDate(2017, 12, 1), QTime(9, 38, 17, 340),
|
QDateTime exp(QDate(2017, 12, 1), QTime(9, 38, 17, 340),
|
||||||
QTimeZone::fromSecondsAheadOfUtc(2 * 3600));
|
Qt::OffsetFromUTC, 2*3600);
|
||||||
ASSERT_EQ(dt, exp);
|
ASSERT_EQ(dt, exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,22 @@ add_executable(IntegrationTests
|
||||||
tst_DataGridMapping.cpp
|
tst_DataGridMapping.cpp
|
||||||
tst_DataGridUpdate.cpp
|
tst_DataGridUpdate.cpp
|
||||||
tst_CrudModelBehavior.cpp
|
tst_CrudModelBehavior.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/crud/CrudModel.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/crud/DataGridWidget.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/crud/RecordPanel.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/OpenDatabase.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/util/PgLabItemDelegate.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/util/Colors.cpp
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/ResultTableModelUtil.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(IntegrationTests PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab
|
||||||
|
${CMAKE_SOURCE_DIR}/pglab/crud
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(IntegrationTests PRIVATE
|
target_link_libraries(IntegrationTests PRIVATE
|
||||||
pgintegration
|
pgintegration
|
||||||
pglabapp
|
|
||||||
pglablib
|
pglablib
|
||||||
GTest::gtest
|
GTest::gtest
|
||||||
Qt6::Core
|
Qt6::Core
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue