Skip to content
Browse files

SDK update

  • Loading branch information...
1 parent 2a8b043 commit b3f521ef69854d4463611caff09093eadff74a1b @ntadej committed Dec 14, 2011
View
58 qmlapplicationviewer/qmlapplicationviewer.cpp
@@ -1,4 +1,4 @@
-// checksum 0x78c version 0x60010
+// checksum 0xee24 version 0x70013
/*
This file was generated by the Qt Quick Application wizard of Qt Creator.
QmlApplicationViewer is a convenience class containing mobile device specific
@@ -12,10 +12,10 @@
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeComponent>
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
-#include <QtGui/QApplication>
#include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
@@ -50,26 +50,21 @@ static QmlJsDebuggingEnabler enableDebuggingHelper;
class QmlApplicationViewerPrivate
{
- QmlApplicationViewerPrivate(QDeclarativeView *view_) : view(view_) {}
-
QString mainQmlFile;
- QDeclarativeView *view;
friend class QmlApplicationViewer;
- QString adjustPath(const QString &path);
+ static QString adjustPath(const QString &path);
};
QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
{
#ifdef Q_OS_UNIX
#ifdef Q_OS_MAC
if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
+ return QString::fromLatin1("%1/../Resources/%2")
+ .arg(QCoreApplication::applicationDirPath(), path);
#else
- QString pathInInstallDir;
- const QString applicationDirPath = QCoreApplication::applicationDirPath();
- pathInInstallDir = QString::fromAscii("%1/../%2").arg(applicationDirPath, path);
-
+ const QString pathInInstallDir =
+ QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
if (QFileInfo(pathInInstallDir).exists())
return pathInInstallDir;
#endif
@@ -79,34 +74,17 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
QmlApplicationViewer::QmlApplicationViewer(QWidget *parent)
: QDeclarativeView(parent)
- , d(new QmlApplicationViewerPrivate(this))
+ , d(new QmlApplicationViewerPrivate())
{
connect(engine(), SIGNAL(quit()), SLOT(close()));
setResizeMode(QDeclarativeView::SizeRootObjectToView);
// Qt versions prior to 4.8.0 don't have QML/JS debugging services built in
#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800
#if !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(d->view->engine());
-#endif
-#if !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view);
-#endif
-#endif
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QDeclarativeView *view, QWidget *parent)
- : QDeclarativeView(parent)
- , d(new QmlApplicationViewerPrivate(view))
-{
- connect(view->engine(), SIGNAL(quit()), view, SLOT(close()));
- view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in
-#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800
-#if !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(d->view->engine());
+ new QmlJSDebugger::JSDebuggerAgent(engine());
#endif
#if !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view);
+ new QmlJSDebugger::QDeclarativeViewObserver(this, this);
#endif
#endif
}
@@ -118,22 +96,18 @@ QmlApplicationViewer::~QmlApplicationViewer()
QmlApplicationViewer *QmlApplicationViewer::create()
{
-#ifdef HARMATTAN_BOOSTER
- return new QmlApplicationViewer(MDeclarativeCache::qDeclarativeView(), 0);
-#else
return new QmlApplicationViewer();
-#endif
}
void QmlApplicationViewer::setMainQmlFile(const QString &file)
{
- d->mainQmlFile = d->adjustPath(file);
- d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile));
+ d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
+ setSource(QUrl::fromLocalFile(d->mainQmlFile));
}
void QmlApplicationViewer::addImportPath(const QString &path)
{
- d->view->engine()->addImportPath(d->adjustPath(path));
+ engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path));
}
void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
@@ -182,11 +156,11 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
void QmlApplicationViewer::showExpanded()
{
#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR)
- d->view->showFullScreen();
+ showFullScreen();
#elif defined(Q_WS_MAEMO_5)
- d->view->showMaximized();
+ showMaximized();
#else
- d->view->show();
+ show();
#endif
}
View
3 qmlapplicationviewer/qmlapplicationviewer.h
@@ -1,4 +1,4 @@
-// checksum 0x82ed version 0x60010
+// checksum 0x898f version 0x70013
/*
This file was generated by the Qt Quick Application wizard of Qt Creator.
QmlApplicationViewer is a convenience class containing mobile device specific
@@ -38,7 +38,6 @@ class QmlApplicationViewer : public QDeclarativeView
void showExpanded();
private:
- explicit QmlApplicationViewer(QDeclarativeView *view, QWidget *parent);
class QmlApplicationViewerPrivate *d;
};
View
4 qmlapplicationviewer/qmlapplicationviewer.pri
@@ -1,4 +1,4 @@
-# checksum 0x368d version 0x60010
+# checksum 0x5b42 version 0x70013
# This file was generated by the Qt Quick Application wizard of Qt Creator.
# The code below adds the QmlApplicationViewer to the project and handles the
# activation of QML debugging.
@@ -52,6 +52,7 @@ symbian {
sourcePathSegments = $$split(source, \\)
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
target = $$replace(target, /, \\)
+ target ~= s,\\\\\\.?\\\\,\\,
!isEqual(source,$$target) {
!isEmpty(copyCommand):copyCommand += &&
isEqual(QMAKE_DIR_SEP, \\) {
@@ -96,6 +97,7 @@ symbian {
target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments)
+ targetFullPath ~= s,/\\.?/,/,
!isEqual(source,$$targetFullPath) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += $(MKDIR) \"$$target\"
View
4 src/people/handlers/PeopleHandler.cpp
@@ -95,7 +95,9 @@ void MPPeopleHandler::profile(const QString &profile)
foreach (QVariant v, reader->result().toMap()["placesLived"].toList()) {
MPPersonInformation *place = new MPPersonInformation(person->id(), MeePlus::codec()->toUnicode(v.toMap()["value"].toByteArray()));
place->setPrimary(v.toMap()["primary"].toBool());
- qDebug() << place->primary();
+
+ if(place->primary())
+ place->setValue(place->value() + " " + tr("(Current)"));
emit newPlace(place);
}

0 comments on commit b3f521e

Please sign in to comment.
Something went wrong with that request. Please try again.