diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-08-28 17:33:47 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-08-29 14:10:41 +0200 |
commit | 1d5091e48f6df341dbd4436843c25afe25cbf4ce (patch) | |
tree | 9151d71b36bcffbba219ef1a0fc4e4f234adbc89 /src/app | |
parent | 7ba0f8a4c42c5db144b599861f38d2e771e0dafe (diff) | |
download | qt-creator-1d5091e48f6df341dbd4436843c25afe25cbf4ce.tar.gz |
Do not use deprecated Qt functionality.
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.
* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.
Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/main.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index a087584555..73703551a4 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -53,8 +53,8 @@ #include <QNetworkProxyFactory> #include <QApplication> -#include <QDesktopServices> #include <QMessageBox> +#include <QStandardPaths> #ifdef ENABLE_QT_BREAKPAD #include <qtsystemexceptionhandler.h> @@ -214,7 +214,8 @@ static inline QStringList getPluginPaths() // "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later // "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux // "~/Library/Application Support/QtProject/Qt Creator" on Mac - pluginPath = QDesktopServices::storageLocation(QDesktopServices::DataLocation); + pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + + QLatin1String("/data"); pluginPath += QLatin1Char('/') + QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR) + QLatin1Char('/'); @@ -297,11 +298,6 @@ int main(int argc, char **argv) setrlimit(RLIMIT_NOFILE, &rl); #endif -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - // QML is unusable with the xlib backend - QApplication::setGraphicsSystem(QLatin1String("raster")); -#endif - SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv); const int threadCount = QThreadPool::globalInstance()->maxThreadCount(); |