forked from qt-creator/qt-creator
WelcomeScreen: Use QUrl for page location
Silences warning from QtDeclarative in Qt 4.8 Change-Id: Iabab0988408b040fd590ebccb24f7fb59614ac8b Reviewed-on: http://codereview.qt.nokia.com/1014 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QMetaType>
|
#include <QtCore/QMetaType>
|
||||||
|
#include <QtCore/QUrl>
|
||||||
|
|
||||||
#include "utils_global.h"
|
#include "utils_global.h"
|
||||||
|
|
||||||
@@ -52,14 +53,14 @@ class QTCREATOR_UTILS_EXPORT IWelcomePage : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY(QString title READ title CONSTANT)
|
Q_PROPERTY(QString title READ title CONSTANT)
|
||||||
Q_PROPERTY(QString pageLocation READ pageLocation CONSTANT)
|
Q_PROPERTY(QUrl pageLocation READ pageLocation CONSTANT)
|
||||||
Q_PROPERTY(int priority READ priority CONSTANT)
|
Q_PROPERTY(int priority READ priority CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IWelcomePage();
|
IWelcomePage();
|
||||||
virtual ~IWelcomePage();
|
virtual ~IWelcomePage();
|
||||||
|
|
||||||
virtual QString pageLocation() const = 0;
|
virtual QUrl pageLocation() const = 0;
|
||||||
virtual QString title() const = 0;
|
virtual QString title() const = 0;
|
||||||
virtual int priority() const { return 0; }
|
virtual int priority() const { return 0; }
|
||||||
virtual void facilitateQml(QDeclarativeEngine *) {}
|
virtual void facilitateQml(QDeclarativeEngine *) {}
|
||||||
|
@@ -103,7 +103,7 @@ public:
|
|||||||
ProjectWelcomePage();
|
ProjectWelcomePage();
|
||||||
|
|
||||||
void facilitateQml(QDeclarativeEngine *engine);
|
void facilitateQml(QDeclarativeEngine *engine);
|
||||||
QString pageLocation() const { return Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/develop.qml"); }
|
QUrl pageLocation() const { return QUrl::fromLocalFile(Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/develop.qml")); }
|
||||||
QWidget *page() { return 0; }
|
QWidget *page() { return 0; }
|
||||||
QString title() const { return tr("Develop"); }
|
QString title() const { return tr("Develop"); }
|
||||||
int priority() const { return 20; }
|
int priority() const { return 20; }
|
||||||
|
@@ -56,7 +56,7 @@ class GettingStartedWelcomePage : public Utils::IWelcomePage
|
|||||||
public:
|
public:
|
||||||
GettingStartedWelcomePage();
|
GettingStartedWelcomePage();
|
||||||
|
|
||||||
QString pageLocation() const { return Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/gettingstarted.qml"); }
|
QUrl pageLocation() const { return QUrl::fromLocalFile(Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/gettingstarted.qml")); }
|
||||||
QString title() const { return tr("Getting Started");}
|
QString title() const { return tr("Getting Started");}
|
||||||
int priority() const { return 10; }
|
int priority() const { return 10; }
|
||||||
void facilitateQml(QDeclarativeEngine *);
|
void facilitateQml(QDeclarativeEngine *);
|
||||||
|
Reference in New Issue
Block a user