summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@nokia.com>2011-10-25 18:54:37 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-26 00:49:18 +0200
commit34bd931c83868806735925ff71becb1f3f1975bf (patch)
tree8b64e11e769334cbd139940f5dbfdf7e81d9ab7b
parent5bd3e8c8b2ae56cf25b2d35f137952e95703d2d5 (diff)
downloadqtsvg-34bd931c83868806735925ff71becb1f3f1975bf.tar.gz
Fixed compile; QDesktopServices -> QStandardPaths
Broken by qtbase dfa24768a3243eda68d91f573050bf23f96da2dd. Change-Id: I4d9366a91efcead98fc4d00fdeb567a11e0977d4 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net>
-rw-r--r--examples/embedded/desktopservices/contenttab.cpp6
-rw-r--r--examples/embedded/desktopservices/contenttab.h5
-rw-r--r--examples/embedded/desktopservices/desktopwidget.cpp8
3 files changed, 10 insertions, 9 deletions
diff --git a/examples/embedded/desktopservices/contenttab.cpp b/examples/embedded/desktopservices/contenttab.cpp
index 49c1260..d1a2832 100644
--- a/examples/embedded/desktopservices/contenttab.cpp
+++ b/examples/embedded/desktopservices/contenttab.cpp
@@ -66,7 +66,7 @@ ContentTab::~ContentTab()
}
// NEW PUBLIC METHODS
-void ContentTab::init(const QDesktopServices::StandardLocation &location,
+void ContentTab::init(const QStandardPaths::StandardLocation &location,
const QString &filter,
const QString &icon)
{
@@ -83,9 +83,9 @@ void ContentTab::init(const QDesktopServices::StandardLocation &location,
}
// NEW PROTECTED METHODS
-void ContentTab::setContentDir(const QDesktopServices::StandardLocation &location)
+void ContentTab::setContentDir(const QStandardPaths::StandardLocation &location)
{
- m_ContentDir.setPath(QDesktopServices::storageLocation(location));
+ m_ContentDir.setPath(QStandardPaths::writableLocation(location));
}
void ContentTab::setIcon(const QString &icon)
diff --git a/examples/embedded/desktopservices/contenttab.h b/examples/embedded/desktopservices/contenttab.h
index 614f42a..191d12e 100644
--- a/examples/embedded/desktopservices/contenttab.h
+++ b/examples/embedded/desktopservices/contenttab.h
@@ -49,6 +49,7 @@
#include <QFileInfo>
#include <QListWidget>
#include <QDesktopServices>
+#include <QStandardPaths>
// INTERNAL INCLUDES
@@ -73,12 +74,12 @@ public: // Constructors & Destructors
virtual ~ContentTab();
public: // New Methods
- virtual void init(const QDesktopServices::StandardLocation &location,
+ virtual void init(const QStandardPaths::StandardLocation &location,
const QString &filter,
const QString &icon);
protected: // New Methods
- virtual void setContentDir(const QDesktopServices::StandardLocation &location);
+ virtual void setContentDir(const QStandardPaths::StandardLocation &location);
virtual void setIcon(const QString &icon);
virtual void populateListWidget();
virtual QString itemName(const QFileInfo &item);
diff --git a/examples/embedded/desktopservices/desktopwidget.cpp b/examples/embedded/desktopservices/desktopwidget.cpp
index d34bb98..7056ac9 100644
--- a/examples/embedded/desktopservices/desktopwidget.cpp
+++ b/examples/embedded/desktopservices/desktopwidget.cpp
@@ -42,7 +42,7 @@
// EXTERNAL INCLUDES
#include <QTabWidget>
#include <QVBoxLayout>
-#include <QDesktopServices>
+#include <QStandardPaths>
// INTERNAL INCLUDES
#include "linktab.h"
@@ -59,14 +59,14 @@ DesktopWidget::DesktopWidget(QWidget *parent) : QWidget(parent)
// Images
ContentTab* imageTab = new ContentTab(tabWidget);
- imageTab->init(QDesktopServices::PicturesLocation,
+ imageTab->init(QStandardPaths::PicturesLocation,
"*.png;*.jpg;*.jpeg;*.bmp;*.gif",
":/resources/photo.png");
tabWidget->addTab(imageTab, tr("Images"));
// Music
ContentTab* musicTab = new ContentTab(tabWidget);
- musicTab->init(QDesktopServices::MusicLocation,
+ musicTab->init(QStandardPaths::MusicLocation,
"*.wav;*.mp3;*.mp4",
":/resources/music.png");
tabWidget->addTab(musicTab, tr("Music"));
@@ -74,7 +74,7 @@ DesktopWidget::DesktopWidget(QWidget *parent) : QWidget(parent)
// Links
LinkTab* othersTab = new LinkTab(tabWidget);;
// Given icon file will be overridden by LinkTab
- othersTab->init(QDesktopServices::PicturesLocation, "", "");
+ othersTab->init(QStandardPaths::PicturesLocation, "", "");
tabWidget->addTab(othersTab, tr("Links"));
// Layout