Merge branch 'develop' into feature/yubikey

This commit is contained in:
Janek Bevendorff 2017-03-10 18:01:14 +01:00
commit 15dd783d2c
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
119 changed files with 616 additions and 381 deletions

View file

@ -120,7 +120,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
QFileInfo fileInfo(fileName);
QString canonicalFilePath = fileInfo.canonicalFilePath();
if (canonicalFilePath.isEmpty()) {
Q_EMIT messageGlobal(tr("File not found!"), MessageWidget::Error);
emit messageGlobal(tr("File not found!"), MessageWidget::Error);
return;
}
@ -141,7 +141,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
if (!file.open(QIODevice::ReadWrite)) {
if (!file.open(QIODevice::ReadOnly)) {
// can't open
Q_EMIT messageGlobal(
emit messageGlobal(
tr("Unable to open the database.").append("\n").append(file.errorString()), MessageWidget::Error);
return;
}
@ -198,7 +198,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
insertDatabase(db, dbStruct);
if (dbStruct.readOnly) {
Q_EMIT messageTab(tr("File opened in read only mode."), MessageWidget::Warning);
emit messageTab(tr("File opened in read only mode."), MessageWidget::Warning);
}
updateLastDatabases(dbStruct.filePath);
@ -209,7 +209,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
else {
dbStruct.dbWidget->switchToOpenDatabase(dbStruct.filePath);
}
Q_EMIT messageDismissGlobal();
emit messageDismissGlobal();
}
void DatabaseTabWidget::mergeDatabase()
@ -314,7 +314,7 @@ void DatabaseTabWidget::deleteDatabase(Database* db)
delete db;
if (emitDatabaseWithFileClosed) {
Q_EMIT databaseWithFileClosed(filePath);
emit databaseWithFileClosed(filePath);
}
}
@ -501,7 +501,7 @@ void DatabaseTabWidget::exportToCsv()
CsvExporter csvExporter;
if (!csvExporter.exportDatabase(fileName, db)) {
Q_EMIT messageGlobal(
emit messageGlobal(
tr("Writing the CSV file failed.").append("\n")
.append(csvExporter.errorString()), MessageWidget::Error);
}
@ -563,7 +563,7 @@ void DatabaseTabWidget::updateTabName(Database* db)
}
setTabText(index, tabName);
Q_EMIT tabNameChanged();
emit tabNameChanged();
}
void DatabaseTabWidget::updateTabNameFromDbSender()
@ -743,7 +743,7 @@ void DatabaseTabWidget::lockDatabases()
// database has changed so we can't use the db variable anymore
updateTabName(dbWidget->database());
Q_EMIT databaseLocked(dbWidget);
emit databaseLocked(dbWidget);
}
}
@ -801,12 +801,12 @@ void DatabaseTabWidget::changeDatabase(Database* newDb, bool unsavedChanges)
void DatabaseTabWidget::emitActivateDatabaseChanged()
{
Q_EMIT activateDatabaseChanged(currentDatabaseWidget());
emit activateDatabaseChanged(currentDatabaseWidget());
}
void DatabaseTabWidget::emitDatabaseUnlockedFromDbWidgetSender()
{
Q_EMIT databaseUnlocked(static_cast<DatabaseWidget*>(sender()));
emit databaseUnlocked(static_cast<DatabaseWidget*>(sender()));
}
void DatabaseTabWidget::connectDatabase(Database* newDb, Database* oldDb)