Coding style fixes.

This commit is contained in:
Felix Geyer 2013-10-13 18:08:50 +02:00
parent ef3d7b7772
commit 5daf0853c9
7 changed files with 15 additions and 14 deletions

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSX_ARGUMENT_PARSER_H
#define KEEPASSX_ARGUMENT_PARSER_H
#ifndef KEEPASSX_ARGUMENTPARSER_H
#define KEEPASSX_ARGUMENTPARSER_H
#include "core/Global.h"
@ -25,7 +25,6 @@
class ArgumentParser
{
public:
static QHash<QString, QString> parseArguments(const QStringList& args);
@ -35,4 +34,4 @@ private:
static const QStringList ArgumentKeys;
};
#endif // KEEPASSX_ARGUMENT_PARSER_H
#endif // KEEPASSX_ARGUMENTPARSER_H

View File

@ -48,7 +48,7 @@ public:
static void createWithBackend(RandomBackend* backend);
private:
Random(RandomBackend* backend);
explicit Random(RandomBackend* backend);
QScopedPointer<RandomBackend> m_backend;
static Random* m_instance;

View File

@ -402,7 +402,8 @@ void MainWindow::closeEvent(QCloseEvent* event)
bool openPreviousDatabasesOnStartup = config()->get("OpenPreviousDatabasesOnStartup").toBool();
if (openPreviousDatabasesOnStartup) {
connect(m_ui->tabWidget, SIGNAL(databaseWithFileClosed(QString)), this, SLOT(rememberOpenDatabases(QString)));
connect(m_ui->tabWidget, SIGNAL(databaseWithFileClosed(QString)),
this, SLOT(rememberOpenDatabases(QString)));
}
if (!m_ui->tabWidget->closeAllDatabases()) {
@ -413,7 +414,8 @@ void MainWindow::closeEvent(QCloseEvent* event)
}
if (openPreviousDatabasesOnStartup) {
disconnect(m_ui->tabWidget, SIGNAL(databaseWithFileClosed(QString)), this, SLOT(rememberOpenDatabases(QString)));
disconnect(m_ui->tabWidget, SIGNAL(databaseWithFileClosed(QString)),
this, SLOT(rememberOpenDatabases(QString)));
config()->set("LastOpenedDatabases", m_openDatabases);
}
}

View File

@ -83,4 +83,3 @@ void MessageBox::setNextAnswer(QMessageBox::StandardButton button)
{
m_nextAnswer = button;
}

View File

@ -53,7 +53,8 @@ SettingsWidget::~SettingsWidget()
void SettingsWidget::loadSettings()
{
m_generalUi->rememberLastDatabasesCheckBox->setChecked(config()->get("RememberLastDatabases").toBool());
m_generalUi->openPreviousDatabasesOnStartupCheckBox->setChecked(config()->get("OpenPreviousDatabasesOnStartup").toBool());
m_generalUi->openPreviousDatabasesOnStartupCheckBox->setChecked(
config()->get("OpenPreviousDatabasesOnStartup").toBool());
m_generalUi->modifiedExpandedChangedCheckBox->setChecked(config()->get("ModifiedOnExpandedStateChanges").toBool());
m_generalUi->autoSaveAfterEveryChangeCheckBox->setChecked(config()->get("AutoSaveAfterEveryChange").toBool());
m_generalUi->autoSaveOnExitCheckBox->setChecked(config()->get("AutoSaveOnExit").toBool());

View File

@ -55,7 +55,8 @@ void TestArgumentParser::testFilename()
void TestArgumentParser::testMultipleArguments()
{
parse(QStringList() << "--config" << "myconfig.ini" << "--filename" << "myfilename" << "--password" << "mypassword");
parse(QStringList() << "--config" << "myconfig.ini" << "--filename" << "myfilename"
<< "--password" << "mypassword");
QCOMPARE(argumentMap.size(), 3);
QCOMPARE(argumentMap.value("config"), QString("myconfig.ini"));

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSX_TEST_ARGUMENT_PARSER_H
#define KEEPASSX_TEST_ARGUMENT_PARSER_H
#ifndef KEEPASSX_TESTARGUMENTPARSER_H
#define KEEPASSX_TESTARGUMENTPARSER_H
#include <QHash>
#include <QObject>
@ -37,7 +37,6 @@ private:
void parse(const QStringList& arguments);
QHash<QString, QString> argumentMap;
};
#endif // KEEPASSX_TEST_ARGUMENT_PARSER_H
#endif // KEEPASSX_TESTARGUMENTPARSER_H