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