diff --git a/src/libsync/connectionvalidator.cpp b/src/libsync/connectionvalidator.cpp index 1c8036fad..80be8f8d6 100644 --- a/src/libsync/connectionvalidator.cpp +++ b/src/libsync/connectionvalidator.cpp @@ -16,7 +16,6 @@ #include #include "connectionvalidator.h" -#include "theme.h" #include "account.h" #include "networkjobs.h" #include "clientproxy.h" diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index e37e10d44..1f22580f0 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -15,7 +15,6 @@ #include "syncengine.h" #include "account.h" -#include "theme.h" #include "owncloudpropagator.h" #include "syncjournaldb.h" #include "syncjournalfilerecord.h" @@ -33,6 +32,7 @@ #include #include +#include #include #include #include @@ -104,7 +104,7 @@ QString SyncEngine::csyncErrorToString(CSYNC_STATUS err) errStr = tr("CSync failed to load the journal file. The journal file is corrupted."); break; case CSYNC_STATUS_NO_MODULE: - errStr = tr("

The %1 plugin for csync could not be loaded.
Please verify the installation!

").arg(Theme::instance()->appNameGUI()); + errStr = tr("

The %1 plugin for csync could not be loaded.
Please verify the installation!

").arg(qApp->applicationName()); break; case CSYNC_STATUS_TREE_ERROR: errStr = tr("CSync got an error while processing internal trees."); @@ -128,7 +128,7 @@ QString SyncEngine::csyncErrorToString(CSYNC_STATUS err) errStr = tr("CSync failed to lookup proxy or server."); break; case CSYNC_STATUS_SERVER_AUTH_ERROR: - errStr = tr("CSync failed to authenticate at the %1 server.").arg(Theme::instance()->appNameGUI()); + errStr = tr("CSync failed to authenticate at the %1 server.").arg(qApp->applicationName()); break; case CSYNC_STATUS_CONNECT_ERROR: errStr = tr("CSync failed to connect to the network."); @@ -149,7 +149,7 @@ QString SyncEngine::csyncErrorToString(CSYNC_STATUS err) errStr = tr("CSync tried to create a directory that already exists."); break; case CSYNC_STATUS_OUT_OF_SPACE: - errStr = tr("CSync: No space on %1 server available.").arg(Theme::instance()->appNameGUI()); + errStr = tr("CSync: No space on %1 server available.").arg(qApp->applicationName()); break; case CSYNC_STATUS_UNSUCCESSFUL: errStr = tr("CSync unspecified error."); diff --git a/src/libsync/utility.cpp b/src/libsync/utility.cpp index 42da7d6c3..a9cb28414 100644 --- a/src/libsync/utility.cpp +++ b/src/libsync/utility.cpp @@ -15,7 +15,7 @@ #include "utility.h" #include "version.h" -#include "theme.h" +#include "config.h" // Note: This file must compile without QtGui #include @@ -130,7 +130,7 @@ QString Utility::octetsToString( qint64 octets ) } // Qtified version of get_platforms() in csync_owncloud.c -QString Utility::platform() +static QLatin1String platform() { #if defined(Q_OS_WIN) return QLatin1String("Windows"); @@ -156,10 +156,10 @@ QString Utility::platform() QByteArray Utility::userAgentString() { QString re = QString::fromLatin1("Mozilla/5.0 (%1) mirall/%2") - .arg(Utility::platform()) + .arg(platform()) .arg(QLatin1String(MIRALL_STRINGIFY(MIRALL_VERSION))); - const QString appName = Theme::instance()->appName(); + QLatin1String appName(APPLICATION_SHORTNAME); // this constant "ownCloud" is defined in the default OEM theming // that is used for the standard client. If it is changed there, diff --git a/src/libsync/utility.h b/src/libsync/utility.h index 56c241da5..272dc8962 100644 --- a/src/libsync/utility.h +++ b/src/libsync/utility.h @@ -32,7 +32,6 @@ namespace Utility OWNCLOUDSYNC_EXPORT void setupFavLink( const QString &folder ); OWNCLOUDSYNC_EXPORT bool writeRandomFile( const QString& fname, int size = -1); OWNCLOUDSYNC_EXPORT QString octetsToString( qint64 octets ); - OWNCLOUDSYNC_EXPORT QString platform(); OWNCLOUDSYNC_EXPORT QByteArray userAgentString(); OWNCLOUDSYNC_EXPORT bool hasLaunchOnStartup(const QString &appName); OWNCLOUDSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString& guiName, bool launch);