From f0d1fbbd5af8b4ef25ae049c92b4db09e0033290 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 7 Feb 2014 16:57:16 +0100 Subject: [PATCH] Big refactoring due to MySQL feature. --- src/core/databasefactory.cpp | 177 +++++++++-------- src/core/databasefactory.h | 3 + src/core/defs.h.in | 3 +- src/core/feedsmodel.cpp | 14 +- src/core/feedsmodelfeed.cpp | 8 +- src/core/feedsmodelstandardfeed.cpp | 2 +- src/core/messagesmodel.cpp | 12 +- src/gui/formsettings.cpp | 14 +- src/gui/formsettings.ui | 295 +++++++++++++++------------- 9 files changed, 286 insertions(+), 242 deletions(-) diff --git a/src/core/databasefactory.cpp b/src/core/databasefactory.cpp index 6a830e24e..e9c3b5c0b 100644 --- a/src/core/databasefactory.cpp +++ b/src/core/databasefactory.cpp @@ -51,7 +51,7 @@ QSqlDatabase DatabaseFactory::sqliteInitializeInMemoryDatabase() { database.setDatabaseName(":memory:"); if (!database.open()) { - qFatal("In-memory database was NOT opened. Delivered error message: '%s'", + qFatal("In-memory SQLite database was NOT opened. Delivered error message: '%s'", qPrintable(database.lastError().text())); } else { @@ -70,13 +70,13 @@ QSqlDatabase DatabaseFactory::sqliteInitializeInMemoryDatabase() { query_db.exec("SELECT inf_value FROM Information WHERE inf_key = 'schema_version'"); if (query_db.lastError().isValid()) { - qWarning("Error occurred. In-memory database is not initialized. Initializing now."); + qWarning("Error occurred. In-memory SQLite database is not initialized. Initializing now."); QFile file_init(APP_MISC_PATH + QDir::separator() + APP_DB_INIT_SQLITE_MEMORY); if (!file_init.open(QIODevice::ReadOnly | QIODevice::Text)) { // Database initialization file not opened. HUGE problem. - qFatal("In-memory database initialization file '%s' from directory '%s' was not found. In-memory database is uninitialized.", + qFatal("In-memory SQLite database initialization file '%s' from directory '%s' was not found. In-memory database is uninitialized.", APP_DB_INIT_SQLITE, qPrintable(APP_MISC_PATH)); } @@ -89,19 +89,19 @@ QSqlDatabase DatabaseFactory::sqliteInitializeInMemoryDatabase() { query_db.exec(statement); if (query_db.lastError().isValid()) { - qFatal("In-memory database initialization failed. Initialization script '%s' is not correct.", + qFatal("In-memory SQLite database initialization failed. Initialization script '%s' is not correct.", APP_DB_INIT_SQLITE); } } database.commit(); - qDebug("In-memory database backend should be ready now."); + qDebug("In-memory SQLite database backend should be ready now."); } else { query_db.next(); - qDebug("In-memory database connection seems to be established."); - qDebug("In-memory database has version '%s'.", qPrintable(query_db.value(0).toString())); + qDebug("In-memory SQLite database connection seems to be established."); + qDebug("In-memory SQLite database has version '%s'.", qPrintable(query_db.value(0).toString())); } // Loading messages from file-based database. @@ -142,7 +142,7 @@ QSqlDatabase DatabaseFactory::sqliteInitializeFileBasedDatabase(const QString &c if (!db_path.exists()) { if (!db_path.mkpath(db_path.absolutePath())) { // Failure when create database file path. - qFatal("Directory '%s' for database file '%s' was NOT created." + qFatal("Directory '%s' for SQLite database file '%s' was NOT created." "This is HUGE problem.", qPrintable(db_path.absolutePath()), qPrintable(db_file.symLinkTarget())); @@ -157,7 +157,7 @@ QSqlDatabase DatabaseFactory::sqliteInitializeFileBasedDatabase(const QString &c database.setDatabaseName(db_file.fileName()); if (!database.open()) { - qFatal("File-based database was NOT opened. Delivered error message: '%s'", + qFatal("File-based SQLite database was NOT opened. Delivered error message: '%s'", qPrintable(database.lastError().text())); } else { @@ -173,16 +173,16 @@ QSqlDatabase DatabaseFactory::sqliteInitializeFileBasedDatabase(const QString &c query_db.exec("PRAGMA temp_store = MEMORY"); // Sample query which checks for existence of tables. - query_db.exec("SELECT value FROM Information WHERE key = 'schema_version'"); + query_db.exec("SELECT inf_value FROM Information WHERE inf_key = 'schema_version'"); if (query_db.lastError().isValid()) { - qWarning("Error occurred. File-based database is not initialized. Initializing now."); + qWarning("Error occurred. File-based SQLite database is not initialized. Initializing now."); QFile file_init(APP_MISC_PATH + QDir::separator() + APP_DB_INIT_SQLITE); if (!file_init.open(QIODevice::ReadOnly | QIODevice::Text)) { // Database initialization file not opened. HUGE problem. - qFatal("Database initialization file '%s' from directory '%s' was not found. File-based database is uninitialized.", + qFatal("SQLite database initialization file '%s' from directory '%s' was not found. File-based database is uninitialized.", APP_DB_INIT_SQLITE, qPrintable(APP_MISC_PATH)); } @@ -195,21 +195,21 @@ QSqlDatabase DatabaseFactory::sqliteInitializeFileBasedDatabase(const QString &c query_db.exec(statement); if (query_db.lastError().isValid()) { - qFatal("File-based database initialization failed. Initialization script '%s' is not correct.", + qFatal("File-based SQLite database initialization failed. Initialization script '%s' is not correct.", APP_DB_INIT_SQLITE); } } database.commit(); - qDebug("File-based database backend should be ready now."); + qDebug("File-based SQLite database backend should be ready now."); } else { query_db.next(); - qDebug("File-based database connection '%s' to file '%s' seems to be established.", + qDebug("File-based SQLite database connection '%s' to file '%s' seems to be established.", qPrintable(connection_name), qPrintable(QDir::toNativeSeparators(database.databaseName()))); - qDebug("File-based database has version '%s'.", qPrintable(query_db.value(0).toString())); + qDebug("File-based SQLite database has version '%s'.", qPrintable(query_db.value(0).toString())); } query_db.finish(); @@ -224,71 +224,14 @@ QSqlDatabase DatabaseFactory::sqliteInitializeFileBasedDatabase(const QString &c QSqlDatabase DatabaseFactory::connection(const QString &connection_name, DesiredType desired_type) { - if (desired_type == DatabaseFactory::StrictlyInMemory || - (desired_type == DatabaseFactory::FromSettings && m_activeDatabaseDriver == SQLITE_MEMORY)) { - // We request in-memory database (either user don't care - // about the type or user overrided it in the settings). - if (!m_sqliteInMemoryDatabaseInitialized) { - // It is not initialized yet. - return sqliteInitializeInMemoryDatabase(); - } - else { - QSqlDatabase database = QSqlDatabase::database(); + switch (m_activeDatabaseDriver) { + case MYSQL: + return QSqlDatabase(); - database.setDatabaseName(":memory:"); - - if (!database.isOpen() && !database.open()) { - qFatal("In-memory database was NOT opened. Delivered error message: '%s'.", - qPrintable(database.lastError().text())); - } - else { - qDebug("In-memory database connection seems to be established."); - } - - return database; - } - } - else { - // We request file-based database. - if (!m_sqliteFileBasedDatabaseinitialized) { - // File-based database is not yet initialised. - return sqliteInitializeFileBasedDatabase(connection_name); - } - else { - QSqlDatabase database; - - if (QSqlDatabase::contains(connection_name)) { - qDebug("Connection '%s' is already active.", - qPrintable(connection_name)); - - // This database connection was added previously, no need to - // setup its properties. - database = QSqlDatabase::database(connection_name); - } - else { - // Database connection with this name does not exist - // yet, add it and set it up. - database = QSqlDatabase::addDatabase(APP_DB_DRIVER_SQLITE, connection_name); - - QDir db_path(m_sqliteDatabaseFilePath); - QFile db_file(db_path.absoluteFilePath(APP_DB_FILE)); - - // Setup database file path. - database.setDatabaseName(db_file.fileName()); - } - - if (!database.isOpen() && !database.open()) { - qFatal("File-based database was NOT opened. Delivered error message: '%s'.", - qPrintable(database.lastError().text())); - } - else { - qDebug("File-based database connection '%s' to file '%s' seems to be established.", - qPrintable(connection_name), - qPrintable(QDir::toNativeSeparators(database.databaseName()))); - } - - return database; - } + case SQLITE: + case SQLITE_MEMORY: + default: + return sqliteConnection(connection_name, desired_type); } } @@ -323,7 +266,7 @@ void DatabaseFactory::sqliteSaveMemoryDatabase() { } void DatabaseFactory::determineDriver() { - QString db_driver = Settings::instance()->value(APP_CFG_GEN, "database_driver", APP_DB_DRIVER_SQLITE).toString(); + QString db_driver = Settings::instance()->value(APP_CFG_DB, "database_driver", APP_DB_DRIVER_SQLITE).toString(); if (db_driver == APP_DB_DRIVER_MYSQL && QSqlDatabase::isDriverAvailable(APP_DB_DRIVER_MYSQL)) { // User wants to use MySQL and MySQL is actually available. Use it. @@ -335,7 +278,7 @@ void DatabaseFactory::determineDriver() { else { // User wants to use SQLite, which is always available. Check if file-based // or in-memory database will be used. - if (Settings::instance()->value(APP_CFG_GEN, "use_in_memory_db", false).toBool()) { + if (Settings::instance()->value(APP_CFG_DB, "use_in_memory_db", false).toBool()) { // Use in-memory SQLite database. m_activeDatabaseDriver = SQLITE_MEMORY; @@ -352,6 +295,76 @@ void DatabaseFactory::determineDriver() { } } +QSqlDatabase DatabaseFactory::sqliteConnection(const QString &connection_name, + DatabaseFactory::DesiredType desired_type) { + if (desired_type == DatabaseFactory::StrictlyInMemory || + (desired_type == DatabaseFactory::FromSettings && m_activeDatabaseDriver == SQLITE_MEMORY)) { + // We request in-memory database (either user explicitly + // needs in-memory database or it was enabled in the settings). + if (!m_sqliteInMemoryDatabaseInitialized) { + // It is not initialized yet. + return sqliteInitializeInMemoryDatabase(); + } + else { + QSqlDatabase database = QSqlDatabase::database(); + + database.setDatabaseName(":memory:"); + + if (!database.isOpen() && !database.open()) { + qFatal("In-memory SQLite database was NOT opened. Delivered error message: '%s'.", + qPrintable(database.lastError().text())); + } + else { + qDebug("In-memory SQLite database connection seems to be established."); + } + + return database; + } + } + else { + // We request file-based database. + if (!m_sqliteFileBasedDatabaseinitialized) { + // File-based database is not yet initialised. + return sqliteInitializeFileBasedDatabase(connection_name); + } + else { + QSqlDatabase database; + + if (QSqlDatabase::contains(connection_name)) { + qDebug("SQLite connection '%s' is already active.", + qPrintable(connection_name)); + + // This database connection was added previously, no need to + // setup its properties. + database = QSqlDatabase::database(connection_name); + } + else { + // Database connection with this name does not exist + // yet, add it and set it up. + database = QSqlDatabase::addDatabase(APP_DB_DRIVER_SQLITE, connection_name); + + QDir db_path(m_sqliteDatabaseFilePath); + QFile db_file(db_path.absoluteFilePath(APP_DB_FILE)); + + // Setup database file path. + database.setDatabaseName(db_file.fileName()); + } + + if (!database.isOpen() && !database.open()) { + qFatal("File-based SQLite database was NOT opened. Delivered error message: '%s'.", + qPrintable(database.lastError().text())); + } + else { + qDebug("File-based SQLite database connection '%s' to file '%s' seems to be established.", + qPrintable(connection_name), + qPrintable(QDir::toNativeSeparators(database.databaseName()))); + } + + return database; + } + } +} + void DatabaseFactory::saveDatabase() { switch (m_activeDatabaseDriver) { case SQLITE_MEMORY: diff --git a/src/core/databasefactory.h b/src/core/databasefactory.h index 3781b9234..ef4df9817 100644 --- a/src/core/databasefactory.h +++ b/src/core/databasefactory.h @@ -83,6 +83,9 @@ class DatabaseFactory : public QObject { // SQLITE stuff. // + QSqlDatabase sqliteConnection(const QString &connection_name, + DesiredType desired_type); + // Performs saving of items from in-memory database // to file-based database. void sqliteSaveMemoryDatabase(); diff --git a/src/core/defs.h.in b/src/core/defs.h.in index bf102d99a..835162115 100755 --- a/src/core/defs.h.in +++ b/src/core/defs.h.in @@ -40,7 +40,7 @@ #define INTERNAL_URL_NEWSPAPER "@APP_LOW_NAME@:newspaper" #define DEFAULT_AUTO_UPDATE_INTERVAL 15 #define AUTO_UPDATE_INTERVAL 60000 -#define STARTUP_UPDATE_DELAY 500 +#define STARTUP_UPDATE_DELAY 1500 #define APP_DB_DRIVER_SQLITE "QSQLITE" #define APP_DB_DRIVER_MYSQL "QMYSQL" @@ -56,6 +56,7 @@ #define APP_CFG_GUI "gui" #define APP_CFG_GEN "main" #define APP_CFG_PROXY "proxy" +#define APP_CFG_DB "database" #define APP_CFG_CUTS "keyboard" #define APP_CFG_BROWSER "browser" #define APP_CFG_MESSAGES "messages" diff --git a/src/core/feedsmodel.cpp b/src/core/feedsmodel.cpp index c6cb5e188..d3f740eaa 100644 --- a/src/core/feedsmodel.cpp +++ b/src/core/feedsmodel.cpp @@ -439,7 +439,7 @@ QList FeedsModel::messagesForFeeds(const QList &feeds) query_read_msg.setForwardOnly(true); query_read_msg.prepare("SELECT title, url, author, date_created, contents " "FROM Messages " - "WHERE deleted = 0 AND feed = :feed;"); + "WHERE is_deleted = 0 AND feed = :feed;"); foreach (FeedsModelFeed *feed, feeds) { query_read_msg.bindValue(":feed", feed->id()); @@ -695,8 +695,8 @@ bool FeedsModel::markFeedsRead(const QList &feeds, QSqlQuery query_read_msg(db_handle); query_read_msg.setForwardOnly(true); - if (!query_read_msg.prepare(QString("UPDATE Messages SET read = :read " - "WHERE feed IN (%1) AND deleted = 0;").arg(textualFeedIds(feeds).join(", ")))) { + if (!query_read_msg.prepare(QString("UPDATE Messages SET is_read = :read " + "WHERE feed IN (%1) AND is_deleted = 0;").arg(textualFeedIds(feeds).join(", ")))) { qWarning("Query preparation failed for feeds read change."); db_handle.rollback(); @@ -734,8 +734,8 @@ bool FeedsModel::markFeedsDeleted(const QList &feeds, query_delete_msg.setForwardOnly(true); if (read_only) { - if (!query_delete_msg.prepare(QString("UPDATE Messages SET deleted = :deleted " - "WHERE feed IN (%1) AND deleted = 0 AND read = 1;").arg(textualFeedIds(feeds).join(", ")))) { + if (!query_delete_msg.prepare(QString("UPDATE Messages SET is_deleted = :deleted " + "WHERE feed IN (%1) AND is_deleted = 0 AND is_read = 1;").arg(textualFeedIds(feeds).join(", ")))) { qWarning("Query preparation failed for feeds clearing."); db_handle.rollback(); @@ -743,8 +743,8 @@ bool FeedsModel::markFeedsDeleted(const QList &feeds, } } else { - if (!query_delete_msg.prepare(QString("UPDATE Messages SET deleted = :deleted " - "WHERE feed IN (%1) AND deleted = 0;").arg(textualFeedIds(feeds).join(", ")))) { + if (!query_delete_msg.prepare(QString("UPDATE Messages SET is_deleted = :deleted " + "WHERE feed IN (%1) AND is_deleted = 0;").arg(textualFeedIds(feeds).join(", ")))) { qWarning("Query preparation failed for feeds clearing."); db_handle.rollback(); diff --git a/src/core/feedsmodelfeed.cpp b/src/core/feedsmodelfeed.cpp index 52a345c95..616d8cd39 100755 --- a/src/core/feedsmodelfeed.cpp +++ b/src/core/feedsmodelfeed.cpp @@ -53,16 +53,16 @@ void FeedsModelFeed::updateCounts(bool including_total_count) { query_all.setForwardOnly(true); if (including_total_count) { - if (query_all.exec(QString("SELECT count() FROM messages " - "WHERE feed = %1 AND deleted = 0;").arg(id())) && + if (query_all.exec(QString("SELECT count() FROM Messages " + "WHERE feed = %1 AND is_deleted = 0;").arg(id())) && query_all.next()) { m_totalCount = query_all.value(0).toInt(); } } // Obtain count of unread messages. - if (query_all.exec(QString("SELECT count() FROM messages " - "WHERE feed = %1 AND deleted = 0 AND read = 0;").arg(id())) && + if (query_all.exec(QString("SELECT count() FROM Messages " + "WHERE feed = %1 AND is_deleted = 0 AND is_read = 0;").arg(id())) && query_all.next()) { m_unreadCount = query_all.value(0).toInt(); } diff --git a/src/core/feedsmodelstandardfeed.cpp b/src/core/feedsmodelstandardfeed.cpp index 7c69e53f2..d78430af8 100755 --- a/src/core/feedsmodelstandardfeed.cpp +++ b/src/core/feedsmodelstandardfeed.cpp @@ -244,7 +244,7 @@ void FeedsModelStandardFeed::updateMessages(const QList &messages) { query_update.prepare("UPDATE Messages " "SET title = :title, url = :url, author = :author, " "date_created = :date_created, contents = :contents, " - "read = 0, important = 0, deleted = 0 " + "is_read = 0, is_important = 0, is_deleted = 0 " "WHERE id = :id"); if (!database.transaction()) { diff --git a/src/core/messagesmodel.cpp b/src/core/messagesmodel.cpp index 9d64d8a28..3dfccf0c6 100644 --- a/src/core/messagesmodel.cpp +++ b/src/core/messagesmodel.cpp @@ -58,7 +58,7 @@ void MessagesModel::loadMessages(const QList feed_ids) { QString assembled_ids = textualFeeds().join(", "); - setFilter(QString("feed IN (%1) AND deleted = 0").arg(assembled_ids)); + setFilter(QString("feed IN (%1) AND is_deleted = 0").arg(assembled_ids)); select(); fetchAll(); @@ -201,7 +201,7 @@ bool MessagesModel::setMessageRead(int row_index, int read) { QSqlQuery query_read_msg(db_handle); query_read_msg.setForwardOnly(true); - if (!query_read_msg.prepare("UPDATE messages SET read = :read " + if (!query_read_msg.prepare("UPDATE messages SET is_read = :read " "WHERE id = :id")) { qWarning("Query preparation failed for message read change."); @@ -257,7 +257,7 @@ bool MessagesModel::switchMessageImportance(int row_index) { QSqlQuery query_importance_msg(db_handle); query_importance_msg.setForwardOnly(true); - if (!query_importance_msg.prepare("UPDATE messages SET important = :important " + if (!query_importance_msg.prepare("UPDATE messages SET is_important = :important " "WHERE id = :id")) { qWarning("Query preparation failed for message importance switch."); @@ -296,7 +296,7 @@ bool MessagesModel::switchBatchMessageImportance(const QModelIndexList &messages QSqlQuery query_importance_msg(db_handle); query_importance_msg.setForwardOnly(true); - if (!query_importance_msg.prepare("UPDATE messages SET important = :important " + if (!query_importance_msg.prepare("UPDATE messages SET is_important = :important " "WHERE id = :id")) { qWarning("Query preparation failed for message importance switch."); @@ -338,7 +338,7 @@ bool MessagesModel::setBatchMessagesDeleted(const QModelIndexList &messages, int QSqlQuery query_delete_msg(db_handle); query_delete_msg.setForwardOnly(true); - if (!query_delete_msg.prepare("UPDATE messages SET deleted = :deleted " + if (!query_delete_msg.prepare("UPDATE messages SET is_deleted = :deleted " "WHERE id = :id")) { qWarning("Query preparation failed for message deletion."); @@ -379,7 +379,7 @@ bool MessagesModel::setBatchMessagesRead(const QModelIndexList &messages, int re QSqlQuery query_read_msg(db_handle); query_read_msg.setForwardOnly(true); - if (!query_read_msg.prepare("UPDATE messages SET read = :read " + if (!query_read_msg.prepare("UPDATE messages SET is_read = :read " "WHERE id = :id")) { qWarning("Query preparation failed for message read change."); diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index e4c411a2c..d36d8ab42 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -442,7 +442,7 @@ void FormSettings::loadGeneral() { m_ui->m_cmbDatabaseDriver->addItem("SQLite", APP_DB_DRIVER_SQLITE); // Load in-memory database status. - m_ui->m_cmbSqliteUseInMemoryDatabase->setChecked(Settings::instance()->value(APP_CFG_GEN, "use_in_memory_db", false).toBool()); + m_ui->m_checkSqliteUseInMemoryDatabase->setChecked(Settings::instance()->value(APP_CFG_DB, "use_in_memory_db", false).toBool()); if (QSqlDatabase::isDriverAvailable(APP_DB_DRIVER_MYSQL)) { // Load MySQL. @@ -452,7 +452,7 @@ void FormSettings::loadGeneral() { } // TODO: nacist podle nastaveni - m_ui->m_cmbDatabaseDriver->setCurrentIndex(m_ui->m_cmbDatabaseDriver->findData(Settings::instance()->value(APP_CFG_GEN, + m_ui->m_cmbDatabaseDriver->setCurrentIndex(m_ui->m_cmbDatabaseDriver->findData(Settings::instance()->value(APP_CFG_DB, "database_driver", APP_DB_DRIVER_SQLITE).toString())); } @@ -468,26 +468,26 @@ void FormSettings::saveGeneral() { } // Setup in-memory database status. - bool original_inmemory = Settings::instance()->value(APP_CFG_GEN, "use_in_memory_db", false).toBool(); - bool new_inmemory = m_ui->m_cmbSqliteUseInMemoryDatabase->isChecked(); + bool original_inmemory = Settings::instance()->value(APP_CFG_DB, "use_in_memory_db", false).toBool(); + bool new_inmemory = m_ui->m_checkSqliteUseInMemoryDatabase->isChecked(); if (original_inmemory != new_inmemory) { m_changedDataTexts.append(tr("in-memory database switched")); } // Save data storage settings. - QString original_db_driver = Settings::instance()->value(APP_CFG_GEN, "database_driver", APP_DB_DRIVER_SQLITE).toString(); + QString original_db_driver = Settings::instance()->value(APP_CFG_DB, "database_driver", APP_DB_DRIVER_SQLITE).toString(); QString selected_db_driver = m_ui->m_cmbDatabaseDriver->itemData(m_ui->m_cmbDatabaseDriver->currentIndex()).toString(); // Save SQLite. - Settings::instance()->setValue(APP_CFG_GEN, "use_in_memory_db", new_inmemory); + Settings::instance()->setValue(APP_CFG_DB, "use_in_memory_db", new_inmemory); if (QSqlDatabase::isDriverAvailable(APP_DB_DRIVER_MYSQL)) { // Save MySQL. // TODO: ulozit username, password atp. } - Settings::instance()->setValue(APP_CFG_GEN, "database_driver", selected_db_driver); + Settings::instance()->setValue(APP_CFG_DB, "database_driver", selected_db_driver); if (original_db_driver != selected_db_driver) { m_changedDataTexts.append(tr("data storage backend changed")); diff --git a/src/gui/formsettings.ui b/src/gui/formsettings.ui index 2a7225255..3c89d6fee 100644 --- a/src/gui/formsettings.ui +++ b/src/gui/formsettings.ui @@ -48,6 +48,11 @@ General + + + Data storage + + Keyboard shortcuts @@ -78,10 +83,10 @@ - 0 + 1 - + 0 @@ -94,59 +99,85 @@ 0 - + Launch RSS Guard on operating system startup - - - - - 0 - 0 - + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + WARNING: Note that switching to another data storage type will NOT preserve your data from currently active data storage. - - Data storage + + Qt::AlignCenter - - - QFormLayout::AllNonFixedFieldsGrow - - - - - Database driver - - - - - - - - - - 0 - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - Use in-memory database as the working database - - - - - - - Usage of in-memory working database has several advantages and pitfalls. Make sure that you are familiar with these before you turn this feature on. Advantages: + + true + + + + + + + Database driver + + + + + + + + + + 0 + + + + + QFormLayout::AllNonFixedFieldsGrow + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Use in-memory database as the working database + + + + + + + Usage of in-memory working database has several advantages and pitfalls. Make sure that you are familiar with these before you turn this feature on. Advantages: <ul> <li>higher speed for feed/message manipulations (especially with thousands of messages displayed),</li> <li>whole database stored in RAM, thus your hard drive can rest more.</li> @@ -157,91 +188,87 @@ Disadvantages: <li>application startup and shutdown can take little longer (max. 2 seconds).</li> </ul> Authors of this application are NOT responsible for lost data. - - - Qt::RichText - - - true - - - 20 - - - - + + + Qt::RichText + + + true + + + 20 + - - - - - - Hostname - - - - - - - - - - - - Port - - - - - - - - 100 - 0 - - - - - - - - - - Username - - - - - - - - - - Password - - - - - - - + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Hostname + - - - - - - WARNING: Note that switching to another data storage type will NOT preserve your data from currently active data storage. - - - Qt::AlignCenter - - - true - - - - + + + + + + + + + + Port + + + + + + + + 100 + 0 + + + + + + + + + + Username + + + + + + + + + + Password + + + + + + + + @@ -351,8 +378,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 558 - 337 + 167 + 219 @@ -1126,11 +1153,11 @@ Authors of this application are NOT responsible for lost data. 558 - 96 + 50 516 - 215 + 154