Fix a few warnings
This commit is contained in:
parent
8a9cbce1cc
commit
1a1bbd0838
3 changed files with 4 additions and 3 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.type() == QMetaType::QString) {
|
if (var.typeId() == 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")) {
|
||||||
|
|
|
||||||
|
|
@ -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.count()));
|
q += "\nFROM " + std::string(fqn.data(), static_cast<size_t>(fqn.size()));
|
||||||
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,6 +2,7 @@
|
||||||
#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>
|
||||||
|
|
@ -29,7 +30,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),
|
||||||
Qt::OffsetFromUTC, 2*3600);
|
QTimeZone::fromSecondsAheadOfUtc(2 * 3600));
|
||||||
ASSERT_EQ(dt, exp);
|
ASSERT_EQ(dt, exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue