#include "qtuiapplication.h"
-#include <QIcon>
#include <QDir>
+#include <QFile>
#include <QStringList>
#ifdef HAVE_KDE4
# include <KStandardDirs>
#endif
+#include "chatviewsettings.h"
#include "client.h"
#include "cliparser.h"
#include "mainwin.h"
Quassel::setRunMode(Quassel::ClientOnly);
-#if QT_VERSION < 0x050000
- qInstallMsgHandler(Client::logMessage);
-#else
- qInstallMessageHandler(Client::logMessage);
+#if QT_VERSION >= 0x050000
connect(this, &QGuiApplication::commitDataRequest, this, &QtUiApplication::commitData, Qt::DirectConnection);
connect(this, &QGuiApplication::saveStateRequest, this, &QtUiApplication::saveState, Qt::DirectConnection);
#endif
return false;
}
- // Checking if settings Icon Theme is valid
- QString savedIcontheme = QtUiSettings().value("IconTheme", QVariant("")).toString();
-#ifndef WITH_OXYGEN
- if (savedIcontheme == "oxygen")
- QtUiSettings().remove("IconTheme");
-#endif
-#ifndef WITH_BREEZE
- if (savedIcontheme == "breeze")
- QtUiSettings().remove("IconTheme");
-#endif
-#ifndef WITH_BREEZE_DARK
- if (savedIcontheme == "breezedark")
- QtUiSettings().remove("IconTheme");
-#endif
-
- // Set the icon theme
- if (Quassel::isOptionSet("icontheme"))
- QIcon::setThemeName(Quassel::optionValue("icontheme"));
- else if (QtUiSettings().value("IconTheme", QVariant("")).toString() != "")
- QIcon::setThemeName(QtUiSettings().value("IconTheme").toString());
- else if (QIcon::themeName().isEmpty())
- // Some platforms don't set a default icon theme; chances are we can find our bundled theme though
- QIcon::setThemeName("breeze");
-
Client::init(new QtUi());
// Init UI only after the event loop has started
QtUi::mainWindow()->quit();
});
-
return true;
}
return false;
//
// NOTE: If you increase the minor version, you MUST ALSO add new version upgrade logic in
// applySettingsMigration()! Otherwise, settings upgrades will fail.
- const uint VERSION_MINOR_CURRENT = 8;
+ const uint VERSION_MINOR_CURRENT = 9;
// Stored minor version
uint versionMinor = s.versionMinor();
// saved. Exceptions will be noted below.
// NOTE: If you add new upgrade logic here, you MUST ALSO increase VERSION_MINOR_CURRENT in
// migrateSettings()! Otherwise, your upgrade logic won't ever be called.
+ case 9:
+ {
+ // New default changes: show highest sender prefix mode, if available
+
+ // --------
+ // ChatView settings
+ ChatViewSettings chatViewSettings;
+ const QString senderPrefixModeId = "SenderPrefixMode";
+ if (!chatViewSettings.valueExists(senderPrefixModeId)) {
+ // New default is HighestMode, preserve previous behavior by setting to NoModes
+ chatViewSettings.setValue(senderPrefixModeId,
+ static_cast<int>(UiStyle::SenderPrefixMode::NoModes));
+ }
+ // --------
+
+ // Migration complete!
+ return true;
+ }
+
case 8:
{
// New default changes: RegEx checkbox now toggles Channel regular expressions, too
// --------
// Migration complete!
+ return true;
}
case 7:
{