Fixed some small details the analyzer was complaining about.
This commit is contained in:
parent
e32c82ac6f
commit
9e645db1a8
7 changed files with 40 additions and 42 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
//{}
|
//{}
|
||||||
|
|
||||||
QueuedBackgroundTask::QueuedBackgroundTask(CompletionFunction on_completion)
|
QueuedBackgroundTask::QueuedBackgroundTask(CompletionFunction on_completion)
|
||||||
: m_completionFunction(on_completion)
|
: m_completionFunction(std::move(on_completion))
|
||||||
{
|
{
|
||||||
setAutoDelete(false);
|
setAutoDelete(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "SqlLexer.h"
|
#include "SqlLexer.h"
|
||||||
|
|
||||||
SqlLexer::SqlLexer(const QString &block, LexerState currentstate)
|
SqlLexer::SqlLexer(QString block, LexerState currentstate)
|
||||||
: m_block(block)
|
: m_block(std::move(block))
|
||||||
, m_state(currentstate)
|
, m_state(currentstate)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -207,7 +207,7 @@ bool SqlLexer::parseSingleQuotedString(int startpos, int &length, BasicTokenType
|
||||||
tokentype = BasicTokenType::QuotedString;
|
tokentype = BasicTokenType::QuotedString;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
nextChar();
|
nextChar();
|
||||||
if (c == '\'') {
|
if (c == '\'') {
|
||||||
// maybe end of string literal
|
// maybe end of string literal
|
||||||
|
|
@ -222,7 +222,6 @@ bool SqlLexer::parseSingleQuotedString(int startpos, int &length, BasicTokenType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -236,7 +235,7 @@ bool SqlLexer::parseDoubleQuotedIdentifier(int startpos, int &length, BasicToken
|
||||||
tokentype = BasicTokenType::QuotedIdentifier;
|
tokentype = BasicTokenType::QuotedIdentifier;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
nextChar();
|
nextChar();
|
||||||
if (c == '"') {
|
if (c == '"') {
|
||||||
// maybe end of string literal
|
// maybe end of string literal
|
||||||
|
|
@ -252,7 +251,6 @@ bool SqlLexer::parseDoubleQuotedIdentifier(int startpos, int &length, BasicToken
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool SqlLexer::parseDollarQuote(int startpos, int &length, BasicTokenType &tokentype, QString &out)
|
bool SqlLexer::parseDollarQuote(int startpos, int &length, BasicTokenType &tokentype, QString &out)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public:
|
||||||
|
|
||||||
class SqlLexer {
|
class SqlLexer {
|
||||||
public:
|
public:
|
||||||
SqlLexer(const QString &block, LexerState currentstate);
|
SqlLexer(QString block, LexerState currentstate);
|
||||||
QChar nextChar();
|
QChar nextChar();
|
||||||
QChar peekChar();
|
QChar peekChar();
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ void BackupDialog::disconnectCurrentProcess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BackupDialog::writeOutput(QString s)
|
void BackupDialog::writeOutput(const QString &s)
|
||||||
{
|
{
|
||||||
ui->stdOutput->appendPlainText(s);
|
ui->stdOutput->appendPlainText(s);
|
||||||
QScrollBar *bar = ui->stdOutput->verticalScrollBar();
|
QScrollBar *bar = ui->stdOutput->verticalScrollBar();
|
||||||
|
|
@ -153,7 +153,7 @@ void BackupDialog::setParams(QStringList &args)
|
||||||
|
|
||||||
int format_index = ui->backupFormat->currentIndex();
|
int format_index = ui->backupFormat->currentIndex();
|
||||||
auto format_model_base = ui->backupFormat->model();
|
auto format_model_base = ui->backupFormat->model();
|
||||||
BackupFormatModel *bfm = dynamic_cast<BackupFormatModel *>(format_model_base);
|
auto *bfm = dynamic_cast<BackupFormatModel *>(format_model_base);
|
||||||
if (bfm) {
|
if (bfm) {
|
||||||
QVariant v = bfm->data(bfm->index(format_index, 1));
|
QVariant v = bfm->data(bfm->index(format_index, 1));
|
||||||
QString format("-F");
|
QString format("-F");
|
||||||
|
|
@ -252,7 +252,7 @@ void BackupDialog::on_backupFormat_currentIndexChanged(int /*index*/)
|
||||||
{
|
{
|
||||||
int format_index = ui->backupFormat->currentIndex();
|
int format_index = ui->backupFormat->currentIndex();
|
||||||
auto format_model_base = ui->backupFormat->model();
|
auto format_model_base = ui->backupFormat->model();
|
||||||
BackupFormatModel *bfm = dynamic_cast<BackupFormatModel *>(format_model_base);
|
auto *bfm = dynamic_cast<BackupFormatModel *>(format_model_base);
|
||||||
if (bfm) {
|
if (bfm) {
|
||||||
QVariant v = bfm->data(bfm->index(format_index, 1));
|
QVariant v = bfm->data(bfm->index(format_index, 1));
|
||||||
QString format = v.toString();
|
QString format = v.toString();
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ private:
|
||||||
QProcess *m_process = nullptr;
|
QProcess *m_process = nullptr;
|
||||||
ConnectionConfig m_config;
|
ConnectionConfig m_config;
|
||||||
|
|
||||||
void writeOutput(QString s);
|
void writeOutput(const QString &s);
|
||||||
|
|
||||||
void setParams(QStringList &args);
|
void setParams(QStringList &args);
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ void setupEnvironment(const ConnectionConfig &cc)
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void Backup(QString dest_file_name)
|
void Backup(const QString &dest_file_name)
|
||||||
{
|
{
|
||||||
|
|
||||||
// QString command_line = "\"" + ExecutableDump + "\" ";
|
// QString command_line = "\"" + ExecutableDump + "\" ";
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ CodeGenerator::~CodeGenerator()
|
||||||
void CodeGenerator::Init(std::shared_ptr<PgDatabaseCatalog> catalog, QString query,
|
void CodeGenerator::Init(std::shared_ptr<PgDatabaseCatalog> catalog, QString query,
|
||||||
std::shared_ptr<const Pgsql::Result> dbres)
|
std::shared_ptr<const Pgsql::Result> dbres)
|
||||||
{
|
{
|
||||||
m_catalog = catalog;
|
m_catalog = std::move(catalog);
|
||||||
m_query = query;
|
m_query = std::move(query);
|
||||||
m_dbres = dbres;
|
m_dbres = std::move(dbres);
|
||||||
generateCode();
|
generateCode();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue