Fixed stringification.
This commit is contained in:
parent
9479005511
commit
d8b355ad83
15
rssguard.pro
15
rssguard.pro
@ -108,14 +108,13 @@ DEFINES += APP_LONG_NAME='"\\\"$$APP_LONG_NAME\\\""'
|
||||
DEFINES += APP_AUTHOR='"\\\"$$APP_AUTHOR\\\""'
|
||||
DEFINES += APP_EMAIL='"\\\"$$APP_EMAIL\\\""'
|
||||
DEFINES += APP_URL='"\\\"$$APP_URL\\\""'
|
||||
DEFINES += APP_URL_ISSUES=\"$$APP_URL_ISSUES\"
|
||||
DEFINES += APP_URL_ISSUES_NEW_GITHUB=\"$$APP_URL_ISSUES_NEW_GITHUB\"
|
||||
DEFINES += APP_URL_ISSUES_NEW_BITBUCKET=\"$$APP_URL_ISSUES_NEW_BITBUCKET\"
|
||||
DEFINES += APP_URL_WIKI=\"$$APP_URL_WIKI\"
|
||||
DEFINES += APP_USERAGENT=\"$$APP_USERAGENT\"
|
||||
DEFINES += APP_DONATE_URL=\"$$APP_DONATE_URL\"
|
||||
DEFINES += APP_SYSTEM_NAME=\"$$QMAKE_HOST.os\"
|
||||
DEFINES += APP_SYSTEM_VERSION=\"$$QMAKE_HOST.arch\"
|
||||
DEFINES += APP_URL_ISSUES='"\\\"$$APP_URL_ISSUES\\\""'
|
||||
DEFINES += APP_URL_ISSUES_NEW='"\\\"$$APP_URL_ISSUES_NEW\\\""'
|
||||
DEFINES += APP_URL_WIKI='"\\\"$$APP_URL_WIKI\\\""'
|
||||
DEFINES += APP_USERAGENT='"\\\"$$APP_USERAGENT\\\""'
|
||||
DEFINES += APP_DONATE_URL='"\\\"$$APP_DONATE_URL\\\""'
|
||||
DEFINES += APP_SYSTEM_NAME='"\\\"$$QMAKE_HOST.os\\\""'
|
||||
DEFINES += APP_SYSTEM_VERSION='"\\\"$$QMAKE_HOST.arch\\\""'
|
||||
|
||||
CODECFORTR = UTF-8
|
||||
CODECFORSRC = UTF-8
|
||||
|
@ -205,23 +205,21 @@
|
||||
#define OS_ID "Mac OS X"
|
||||
#elif defined(Q_OS_WIN)
|
||||
#define OS_ID "Windows"
|
||||
#elif defined(Q_OS_OS2)
|
||||
#define OS_ID "OS2"
|
||||
#else
|
||||
#define OS_ID ""
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#define APP_DESKTOP_ENTRY_PATH STRFY(APP_PREFIX) + QString("/share/applications")
|
||||
#define APP_DESKTOP_ENTRY_PATH APP_PREFIX + QString("/share/applications")
|
||||
#define APP_DESKTOP_ENTRY_FILE "rssguard.desktop"
|
||||
#define APP_LANG_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/l10n")
|
||||
#define APP_SKIN_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/skins")
|
||||
#define APP_INFO_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/information")
|
||||
#define APP_THEME_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/icons")
|
||||
#define APP_MISC_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/misc")
|
||||
#define APP_ICON_PATH STRFY(APP_PREFIX) + QString("/share/pixmaps/rssguard.png")
|
||||
#define APP_ICON_PLAIN_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/icons/rssguard_plain.png")
|
||||
#define APP_INITIAL_FEEDS_PATH STRFY(APP_PREFIX) + QString("/share/rssguard/initial_feeds")
|
||||
#define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n")
|
||||
#define APP_SKIN_PATH APP_PREFIX + QString("/share/rssguard/skins")
|
||||
#define APP_INFO_PATH APP_PREFIX + QString("/share/rssguard/information")
|
||||
#define APP_THEME_PATH APP_PREFIX + QString("/share/rssguard/icons")
|
||||
#define APP_MISC_PATH APP_PREFIX + QString("/share/rssguard/misc")
|
||||
#define APP_ICON_PATH APP_PREFIX + QString("/share/pixmaps/rssguard.png")
|
||||
#define APP_ICON_PLAIN_PATH APP_PREFIX + QString("/share/rssguard/icons/rssguard_plain.png")
|
||||
#define APP_INITIAL_FEEDS_PATH APP_PREFIX + QString("/share/rssguard/initial_feeds")
|
||||
#elif defined(Q_OS_WIN)
|
||||
#define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n")
|
||||
#define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins")
|
||||
|
@ -33,7 +33,7 @@ FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout(
|
||||
setWindowIcon(qApp->icons()->fromTheme(QSL("help-about")));
|
||||
|
||||
//: About RSS Guard dialog title.
|
||||
setWindowTitle(tr("About %1").arg(STRFY(APP_NAME)));
|
||||
setWindowTitle(tr("About %1").arg(APP_NAME));
|
||||
|
||||
m_ui->m_lblIcon->setPixmap(QPixmap(APP_ICON_PATH));
|
||||
|
||||
@ -59,7 +59,7 @@ void FormAbout::loadSettingsAndPaths() {
|
||||
m_ui->m_txtPathsSettingsType->setText(tr("PARTIALLY portable"));
|
||||
m_ui->m_txtPathsDatabaseRoot->setText(QDir::toNativeSeparators(qApp->homeFolderPath() +
|
||||
QDir::separator() +
|
||||
QString(STRFY(APP_LOW_H_NAME)) +
|
||||
QString(APP_LOW_H_NAME) +
|
||||
QDir::separator() +
|
||||
QString(APP_DB_SQLITE_PATH)));
|
||||
}
|
||||
@ -103,14 +103,14 @@ void FormAbout::loadLicenseAndInformation() {
|
||||
"<b>Revision:</b> %4<br>"
|
||||
"<b>Build date:</b> %5<br>"
|
||||
"<b>Qt:</b> %6 (compiled against %7)<br>").arg(qApp->applicationVersion(),
|
||||
STRFY(APP_SYSTEM_NAME),
|
||||
STRFY(APP_SYSTEM_VERSION),
|
||||
APP_SYSTEM_NAME,
|
||||
APP_SYSTEM_VERSION,
|
||||
STRFY(APP_REVISION),
|
||||
TextFactory::parseDateTime(QString("%1 %2").arg(__DATE__,
|
||||
__TIME__)).toString(Qt::DefaultLocaleShortDate),
|
||||
qVersion(),
|
||||
QT_VERSION_STR,
|
||||
STRFY(APP_NAME)));
|
||||
APP_NAME));
|
||||
|
||||
m_ui->m_txtInfo->setText(tr("<body>%5 is a (very) tiny feed reader."
|
||||
"<br><br>This software is distributed under the terms of GNU General Public License, version 3."
|
||||
@ -118,9 +118,9 @@ void FormAbout::loadLicenseAndInformation() {
|
||||
"<ul><li><a href=\"mailto://%1\">%1</a> ~e-mail</li>"
|
||||
"<li><a href=\"%2\">%2</a> ~website</li></ul>"
|
||||
"You can obtain source code for %5 from its website."
|
||||
"<br><br><br>Copyright (C) 2011-%3 %4</body>").arg(STRFY(APP_EMAIL),
|
||||
"<br><br><br>Copyright (C) 2011-%3 %4</body>").arg(APP_EMAIL,
|
||||
APP_URL,
|
||||
QString::number(QDateTime::currentDateTime().date().year()),
|
||||
STRFY(APP_AUTHOR),
|
||||
STRFY(APP_NAME)));
|
||||
APP_AUTHOR,
|
||||
APP_NAME));
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ FormBackupDatabaseSettings::FormBackupDatabaseSettings(QWidget *parent) : QDialo
|
||||
connect(m_ui->m_btnSelectFolder, SIGNAL(clicked()), this, SLOT(selectFolder()));
|
||||
|
||||
selectFolder(qApp->documentsFolderPath());
|
||||
m_ui->m_txtBackupName->lineEdit()->setText(QString(STRFY(APP_LOW_NAME)) + QL1S("_") + QDateTime::currentDateTime().toString(QSL("yyyyMMddHHmm")));
|
||||
m_ui->m_txtBackupName->lineEdit()->setText(QString(APP_LOW_NAME) + QL1S("_") + QDateTime::currentDateTime().toString(QSL("yyyyMMddHHmm")));
|
||||
m_ui->m_lblResult->setStatus(WidgetWithStatus::Warning, tr("No operation executed yet."), tr("No operation executed yet."));
|
||||
|
||||
if (qApp->database()->activeDatabaseDriver() != DatabaseFactory::SQLITE &&
|
||||
|
@ -148,9 +148,9 @@ void FormMain::prepareMenus() {
|
||||
// Setup menu for tray icon.
|
||||
if (SystemTrayIcon::isSystemTrayAvailable()) {
|
||||
#if defined(Q_OS_WIN)
|
||||
m_trayMenu = new TrayIconMenu(STRFY(APP_NAME), this);
|
||||
m_trayMenu = new TrayIconMenu(APP_NAME, this);
|
||||
#else
|
||||
m_trayMenu = new QMenu(STRFY(APP_NAME), this);
|
||||
m_trayMenu = new QMenu(APP_NAME, this);
|
||||
#endif
|
||||
|
||||
// Add needed items to the menu.
|
||||
@ -529,7 +529,7 @@ void FormMain::showUpdates() {
|
||||
}
|
||||
|
||||
void FormMain::showWiki() {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(STRFY(APP_URL_WIKI))) {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(APP_URL_WIKI)) {
|
||||
qApp->showGuiMessage(tr("Cannot open external browser"),
|
||||
tr("Cannot open external browser. Navigate to application website manually."),
|
||||
QSystemTrayIcon::Warning, this, true);
|
||||
@ -544,7 +544,7 @@ void FormMain::showAddAccountDialog() {
|
||||
}
|
||||
|
||||
void FormMain::reportABug() {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(STRFY(APP_URL_ISSUES_NEW))) {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(APP_URL_ISSUES_NEW)) {
|
||||
qApp->showGuiMessage(tr("Cannot open external browser"),
|
||||
tr("Cannot open external browser. Navigate to application website manually."),
|
||||
QSystemTrayIcon::Warning, this, true);
|
||||
@ -552,7 +552,7 @@ void FormMain::reportABug() {
|
||||
}
|
||||
|
||||
void FormMain::donate() {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(STRFY(APP_DONATE_URL))) {
|
||||
if (!WebFactory::instance()->openUrlInExternalBrowser(APP_DONATE_URL)) {
|
||||
qApp->showGuiMessage(tr("Cannot open external browser"),
|
||||
tr("Cannot open external browser. Navigate to application website manually."),
|
||||
QSystemTrayIcon::Warning, this, true);
|
||||
|
@ -635,7 +635,7 @@ void FormSettings::switchMysqlPasswordVisiblity(bool visible) {
|
||||
}
|
||||
|
||||
void FormSettings::loadGeneral() {
|
||||
m_ui->m_checkAutostart->setText(m_ui->m_checkAutostart->text().arg(STRFY(APP_NAME)));
|
||||
m_ui->m_checkAutostart->setText(m_ui->m_checkAutostart->text().arg(APP_NAME));
|
||||
m_ui->m_checkForUpdatesOnStart->setChecked(m_settings->value(GROUP(General), SETTING(General::UpdateOnStartup)).toBool());
|
||||
|
||||
// Load auto-start status.
|
||||
|
@ -36,7 +36,7 @@ FormUpdate::FormUpdate(QWidget *parent)
|
||||
m_ui->setupUi(this);
|
||||
m_btnUpdate = m_ui->m_buttonBox->addButton(tr("Download update"), QDialogButtonBox::ActionRole);
|
||||
m_btnUpdate->setToolTip(tr("Download new installation files."));
|
||||
m_ui->m_lblCurrentRelease->setText(STRFY(APP_VERSION));
|
||||
m_ui->m_lblCurrentRelease->setText(APP_VERSION);
|
||||
|
||||
// Set flags and attributes.
|
||||
setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
|
||||
@ -82,7 +82,7 @@ void FormUpdate::checkForUpdates() {
|
||||
|
||||
const bool is_self_update_for_this_system = isUpdateForThisSystem() && isSelfUpdateSupported();
|
||||
|
||||
if (SystemFactory::isVersionNewer(update.first.m_availableVersion, STRFY(APP_VERSION))) {
|
||||
if (SystemFactory::isVersionNewer(update.first.m_availableVersion, APP_VERSION)) {
|
||||
m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok,
|
||||
tr("New release available."),
|
||||
tr("This is new version which can be\ndownloaded."));
|
||||
|
@ -37,7 +37,7 @@ TrayIconMenu::~TrayIconMenu() {
|
||||
bool TrayIconMenu::event(QEvent *event) {
|
||||
if (event->type() == QEvent::Show && Application::activeModalWidget() != nullptr) {
|
||||
QTimer::singleShot(0, this, SLOT(hide()));
|
||||
qApp->showGuiMessage(QSL(STRFY(APP_LONG_NAME)),
|
||||
qApp->showGuiMessage(QSL(APP_LONG_NAME),
|
||||
tr("Close opened modal dialogs first."),
|
||||
QSystemTrayIcon::Warning, qApp->mainForm(), true);
|
||||
}
|
||||
@ -121,11 +121,11 @@ void SystemTrayIcon::show() {
|
||||
|
||||
void SystemTrayIcon::setNumber(int number, bool any_new_message) {
|
||||
if (number <= 0) {
|
||||
setToolTip(QSL(STRFY(APP_LONG_NAME)));
|
||||
setToolTip(QSL(APP_LONG_NAME));
|
||||
QSystemTrayIcon::setIcon(QIcon(m_normalIcon));
|
||||
}
|
||||
else {
|
||||
setToolTip(tr("%1\nUnread news: %2").arg(QSL(STRFY(APP_LONG_NAME)), QString::number(number)));
|
||||
setToolTip(tr("%1\nUnread news: %2").arg(QSL(APP_LONG_NAME), QString::number(number)));
|
||||
|
||||
QPixmap background(m_plainPixmap);
|
||||
QPainter tray_painter;
|
||||
|
20
src/main.cpp
20
src/main.cpp
@ -59,7 +59,7 @@ int main(int argc, char *argv[]) {
|
||||
qInstallMessageHandler(Debugging::debugHandler);
|
||||
|
||||
// Instantiate base application object.
|
||||
Application application(STRFY(APP_LOW_NAME), argc, argv);
|
||||
Application application(APP_LOW_NAME, argc, argv);
|
||||
qDebug("Instantiated Application class.");
|
||||
|
||||
// Check if another instance is running.
|
||||
@ -81,10 +81,10 @@ int main(int argc, char *argv[]) {
|
||||
qApp->localization()->loadActiveLanguage();
|
||||
|
||||
// These settings needs to be set before any QSettings object.
|
||||
Application::setApplicationName(STRFY(APP_NAME));
|
||||
Application::setApplicationVersion(STRFY(APP_VERSION));
|
||||
Application::setOrganizationName(STRFY(APP_AUTHOR));
|
||||
Application::setOrganizationDomain(STRFY(APP_URL));
|
||||
Application::setApplicationName(APP_NAME);
|
||||
Application::setApplicationVersion(APP_VERSION);
|
||||
Application::setOrganizationName(APP_AUTHOR);
|
||||
Application::setOrganizationDomain(APP_URL);
|
||||
Application::setWindowIcon(QIcon(STRFY(APP_ICON_PATH)));
|
||||
|
||||
qDebug().nospace() << "Creating main application form in thread: \'" << QThread::currentThreadId() << "\'.";
|
||||
@ -93,7 +93,7 @@ int main(int argc, char *argv[]) {
|
||||
FormMain main_window;
|
||||
|
||||
// Set correct information for main window.
|
||||
main_window.setWindowTitle(STRFY(APP_LONG_NAME));
|
||||
main_window.setWindowTitle(APP_LONG_NAME);
|
||||
|
||||
// Now is a good time to initialize dynamic keyboard shortcuts.
|
||||
DynamicShortcuts::load(qApp->userActions());
|
||||
@ -120,13 +120,13 @@ int main(int argc, char *argv[]) {
|
||||
// Setup single-instance behavior.
|
||||
QObject::connect(&application, SIGNAL(messageReceived(QString)), &application, SLOT(processExecutionMessage(QString)));
|
||||
|
||||
if (qApp->isFirstRun() || qApp->isFirstRun(STRFY(APP_VERSION))) {
|
||||
qApp->showGuiMessage(QSL(STRFY(APP_NAME)), QObject::tr("Welcome to %1.\n\nPlease, check NEW stuff included in this\n"
|
||||
"version by clicking this popup notification.").arg(STRFY(APP_LONG_NAME)),
|
||||
if (qApp->isFirstRun() || qApp->isFirstRun(APP_VERSION)) {
|
||||
qApp->showGuiMessage(QSL(APP_NAME), QObject::tr("Welcome to %1.\n\nPlease, check NEW stuff included in this\n"
|
||||
"version by clicking this popup notification.").arg(APP_LONG_NAME),
|
||||
QSystemTrayIcon::NoIcon, 0, false, &main_window, SLOT(showAbout()));
|
||||
}
|
||||
else {
|
||||
qApp->showGuiMessage(QSL(STRFY(APP_NAME)), QObject::tr("Welcome to %1.").arg(STRFY(APP_NAME)), QSystemTrayIcon::NoIcon);
|
||||
qApp->showGuiMessage(QSL(APP_NAME), QObject::tr("Welcome to %1.").arg(APP_NAME), QSystemTrayIcon::NoIcon);
|
||||
}
|
||||
|
||||
if (qApp->settings()->value(GROUP(General), SETTING(General::UpdateOnStartup)).toBool()) {
|
||||
|
@ -81,7 +81,7 @@ bool Application::isFirstRun() {
|
||||
}
|
||||
|
||||
bool Application::isFirstRun(const QString &version) {
|
||||
if (version == STRFY(APP_VERSION)) {
|
||||
if (version == APP_VERSION) {
|
||||
// Check this only if checked version is equal to actual version.
|
||||
return settings()->value(GROUP(General), QString(General::FirstRun) + QL1C('_') + version, true).toBool();
|
||||
}
|
||||
@ -183,7 +183,7 @@ void Application::processExecutionMessage(const QString &message) {
|
||||
|
||||
foreach (const QString &msg, message.split(ARGUMENTS_LIST_SEPARATOR)) {
|
||||
if (msg == APP_IS_RUNNING) {
|
||||
showGuiMessage(STRFY(APP_NAME), tr("Application is already running."), QSystemTrayIcon::Information);
|
||||
showGuiMessage(APP_NAME, tr("Application is already running."), QSystemTrayIcon::Information);
|
||||
mainForm()->display();
|
||||
}
|
||||
else if (msg == APP_QUIT_INSTANCE) {
|
||||
@ -265,7 +265,7 @@ void Application::onSaveState(QSessionManager &manager) {
|
||||
|
||||
void Application::onAboutToQuit() {
|
||||
eliminateFirstRun();
|
||||
eliminateFirstRun(STRFY(APP_VERSION));
|
||||
eliminateFirstRun(APP_VERSION);
|
||||
|
||||
// Make sure that we obtain close lock BEFORE even trying to quit the application.
|
||||
const bool locked_safely = feedUpdateLock()->tryLock(4 * CLOSE_LOCK_TIMEOUT);
|
||||
|
@ -192,7 +192,7 @@ void DatabaseFactory::sqliteAssemblyDatabaseFilePath() {
|
||||
}
|
||||
else {
|
||||
m_sqliteDatabaseFilePath = qApp->homeFolderPath() + QDir::separator() +
|
||||
QString(STRFY(APP_LOW_NAME)) + QDir::separator() +
|
||||
QString(APP_LOW_NAME) + QDir::separator() +
|
||||
QString(APP_DB_SQLITE_PATH);
|
||||
}
|
||||
}
|
||||
@ -647,7 +647,7 @@ QSqlDatabase DatabaseFactory::mysqlInitializeDatabase(const QString &connection_
|
||||
determineDriver();
|
||||
MessageBox::show(nullptr, QMessageBox::Critical, tr("MySQL database not available"),
|
||||
tr("%1 cannot use MySQL storage, it is not available. %1 is now switching to SQLite database. Start your MySQL server "
|
||||
"and make adjustments in application settings.").arg(STRFY(APP_NAME)));
|
||||
"and make adjustments in application settings.").arg(APP_NAME));
|
||||
|
||||
return connection(objectName(), FromSettings);
|
||||
}
|
||||
|
@ -33,11 +33,11 @@ void Debugging::performLog(const char *message, QtMsgType type, const char *file
|
||||
|
||||
// Write to console.
|
||||
if (file == 0 || function == 0 || line < 0) {
|
||||
fprintf(stderr, "[%s] %s: %s\n", STRFY(APP_LOW_NAME), type_string, message);
|
||||
fprintf(stderr, "[%s] %s: %s\n", APP_LOW_NAME, type_string, message);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "[%s] %s\n Type: %s\n File: %s (line %d)\n Function: %s\n\n",
|
||||
STRFY(APP_LOW_NAME), message, type_string, file, line, function);
|
||||
APP_LOW_NAME, message, type_string, file, line, function);
|
||||
}
|
||||
|
||||
if (type == QtFatalMsg) {
|
||||
|
@ -219,7 +219,7 @@ DKEY Database::MySQLPassword = "mysql_password";
|
||||
DVALUE(QString) Database::MySQLPasswordDef = QString();
|
||||
|
||||
DKEY Database::MySQLDatabase = "mysql_database";
|
||||
DVALUE(char*) Database::MySQLDatabaseDef = STRFY(APP_LOW_NAME);
|
||||
DVALUE(char*) Database::MySQLDatabaseDef = APP_LOW_NAME;
|
||||
|
||||
DKEY Database::MySQLPort = "mysql_port";
|
||||
DVALUE(int) Database::MySQLPortDef = APP_DB_MYSQL_PORT;
|
||||
@ -326,7 +326,7 @@ SettingsProperties Settings::determineProperties() {
|
||||
properties.m_settingsSuffix = QDir::separator() + QString(APP_CFG_PATH) + QDir::separator() + QString(APP_CFG_FILE);
|
||||
|
||||
const QString app_path = qApp->applicationDirPath();
|
||||
const QString home_path = qApp->homeFolderPath() + QDir::separator() + QString(STRFY(APP_LOW_H_NAME));
|
||||
const QString home_path = qApp->homeFolderPath() + QDir::separator() + QString(APP_LOW_H_NAME);
|
||||
const QString home_path_file = home_path + properties.m_settingsSuffix;
|
||||
|
||||
const bool portable_settings_available = QFileInfo(app_path).isWritable();
|
||||
|
@ -51,7 +51,7 @@ SystemFactory::AutoStartStatus SystemFactory::getAutoStartStatus() const {
|
||||
#if defined(Q_OS_WIN)
|
||||
QSettings registry_key(QSL("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"),
|
||||
QSettings::NativeFormat);
|
||||
const bool autostart_enabled = registry_key.value(QSL(STRFY(APP_LOW_NAME)),
|
||||
const bool autostart_enabled = registry_key.value(QSL(APP_LOW_NAME),
|
||||
QString()).toString().replace(QL1C('\\'),
|
||||
QL1C('/')) ==
|
||||
Application::applicationFilePath();
|
||||
@ -127,12 +127,12 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) {
|
||||
|
||||
switch (new_status) {
|
||||
case SystemFactory::Enabled:
|
||||
registry_key.setValue(STRFY(APP_LOW_NAME),
|
||||
registry_key.setValue(APP_LOW_NAME,
|
||||
Application::applicationFilePath().replace(QL1C('/'), QL1C('\\')));
|
||||
return true;
|
||||
|
||||
case SystemFactory::Disabled:
|
||||
registry_key.remove(STRFY(APP_LOW_NAME));
|
||||
registry_key.remove(APP_LOW_NAME);
|
||||
return true;
|
||||
|
||||
default:
|
||||
@ -287,7 +287,7 @@ void SystemFactory::checkForUpdatesOnStartup() {
|
||||
const UpdateCheck updates = checkForUpdates();
|
||||
|
||||
if (updates.second == QNetworkReply::NoError && isVersionNewer(updates.first.m_availableVersion,
|
||||
STRFY(APP_VERSION))) {
|
||||
APP_VERSION)) {
|
||||
qApp->showGuiMessage(tr("New version available"),
|
||||
tr("Click the bubble for more information."),
|
||||
QSystemTrayIcon::Information,
|
||||
|
@ -76,7 +76,7 @@ QNetworkReply *BaseNetworkAccessManager::createRequest(QNetworkAccessManager::Op
|
||||
new_request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
|
||||
|
||||
// Setup custom user-agent.
|
||||
new_request.setRawHeader(USER_AGENT_HTTP_HEADER, QString(STRFY(APP_USERAGENT)).toLocal8Bit());
|
||||
new_request.setRawHeader(USER_AGENT_HTTP_HEADER, QString(APP_USERAGENT).toLocal8Bit());
|
||||
|
||||
return QNetworkAccessManager::createRequest(op, new_request, outgoingData);
|
||||
}
|
||||
|
@ -62,11 +62,11 @@ QString OwnCloudServiceEntryPoint::description() const {
|
||||
}
|
||||
|
||||
QString OwnCloudServiceEntryPoint::version() const {
|
||||
return STRFY(APP_VERSION);
|
||||
return APP_VERSION;
|
||||
}
|
||||
|
||||
QString OwnCloudServiceEntryPoint::author() const {
|
||||
return STRFY(APP_AUTHOR);
|
||||
return APP_AUTHOR;
|
||||
}
|
||||
|
||||
QIcon OwnCloudServiceEntryPoint::icon() const {
|
||||
|
@ -57,7 +57,7 @@ bool FeedsImportExportModel::exportToOMPL20(QByteArray &result) {
|
||||
QDomElement elem_opml_head = opml_document.createElement(QSL("head"));
|
||||
|
||||
QDomElement elem_opml_title = opml_document.createElement(QSL("title"));
|
||||
QDomText text_opml_title = opml_document.createTextNode(QString(STRFY(APP_NAME)));
|
||||
QDomText text_opml_title = opml_document.createTextNode(QString(APP_NAME));
|
||||
elem_opml_title.appendChild(text_opml_title);
|
||||
elem_opml_head.appendChild(elem_opml_title);
|
||||
|
||||
|
@ -43,11 +43,11 @@ QString StandardServiceEntryPoint::description() const {
|
||||
}
|
||||
|
||||
QString StandardServiceEntryPoint::version() const {
|
||||
return STRFY(APP_VERSION);
|
||||
return APP_VERSION;
|
||||
}
|
||||
|
||||
QString StandardServiceEntryPoint::author() const {
|
||||
return STRFY(APP_AUTHOR);
|
||||
return APP_AUTHOR;
|
||||
}
|
||||
|
||||
QIcon StandardServiceEntryPoint::icon() const {
|
||||
|
@ -47,7 +47,7 @@ StandardServiceRoot::StandardServiceRoot(RootItem *parent)
|
||||
m_actionExportFeeds(nullptr), m_actionImportFeeds(nullptr), m_serviceMenu(QList<QAction*>()),
|
||||
m_feedContextMenu(QList<QAction*>()), m_actionFeedFetchMetadata(nullptr) {
|
||||
|
||||
setTitle(qApp->system()->getUsername() + QL1S("@") + QL1S(STRFY(APP_LOW_NAME)));
|
||||
setTitle(qApp->system()->getUsername() + QL1S("@") + QL1S(APP_LOW_NAME));
|
||||
setIcon(StandardServiceEntryPoint().icon());
|
||||
setDescription(tr("This is obligatory service account for standard RSS/RDF/ATOM feeds."));
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ QString TtRssServiceEntryPoint::description() const {
|
||||
}
|
||||
|
||||
QString TtRssServiceEntryPoint::version() const {
|
||||
return STRFY(APP_VERSION);
|
||||
return APP_VERSION;
|
||||
}
|
||||
|
||||
QString TtRssServiceEntryPoint::author() const {
|
||||
return STRFY(APP_AUTHOR);
|
||||
return APP_AUTHOR;
|
||||
}
|
||||
|
||||
QIcon TtRssServiceEntryPoint::icon() const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user