summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-03-05 08:08:03 +0100
committerMontel Laurent <[email protected]>2015-03-05 08:08:51 +0100
commitf815359d9ce9b68c8bb84e8aeeab6e8508422c64 (patch)
treeb071bceaeda780e9edcfcb7d1a2e7f69f6f66b7b
parent0db893e5f7cb55f01ffdfae68e7d83ef0e42a5e8 (diff)
Remove some kde4support
-rw-r--r--app/configdialog.cpp3
-rw-r--r--app/sidebar.cpp3
-rw-r--r--importer/importdialog.cpp5
-rw-r--r--importer/importer.cpp3
-rw-r--r--importer/importerconfigdialog.cpp4
-rw-r--r--importer/thumbnailpage.cpp2
-rw-r--r--lib/crop/cropwidget.cpp3
7 files changed, 14 insertions, 9 deletions
diff --git a/app/configdialog.cpp b/app/configdialog.cpp
index 8b8eb67..25715c7 100644
--- a/app/configdialog.cpp
+++ b/app/configdialog.cpp
@@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "ui_advancedconfigpage.h"
#include <lib/gwenviewconfig.h>
#include <lib/invisiblebuttongroup.h>
+#include <QFontDatabase>
namespace Gwenview
{
@@ -110,7 +111,7 @@ ConfigDialog::ConfigDialog(QWidget* parent)
widget = setupPage(d->mAdvancedConfigPage);
pageItem = addPage(widget, i18n("Advanced"));
pageItem->setIcon(QIcon::fromTheme("preferences-other"));
- d->mAdvancedConfigPage.cacheHelpLabel->setFont(KGlobalSettings::smallestReadableFont());
+ d->mAdvancedConfigPage.cacheHelpLabel->setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
updateViewBackgroundFrame();
}
diff --git a/app/sidebar.cpp b/app/sidebar.cpp
index 50a985b..ec98f7c 100644
--- a/app/sidebar.cpp
+++ b/app/sidebar.cpp
@@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KDE
#include <KGlobalSettings>
#include <KIconLoader>
+#include <QFontDatabase>
// Local
@@ -206,7 +207,7 @@ SideBar::SideBar(QWidget* parent)
: QTabWidget(parent)
, d(new SideBarPrivate)
{
- setFont(KGlobalSettings::smallestReadableFont());
+ setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
tabBar()->setDocumentMode(true);
tabBar()->setUsesScrollButtons(false);
tabBar()->setFocusPolicy(Qt::NoFocus);
diff --git a/importer/importdialog.cpp b/importer/importdialog.cpp
index 3f22e07..2a4d468 100644
--- a/importer/importdialog.cpp
+++ b/importer/importdialog.cpp
@@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <KService>
#include <KStandardGuiItem>
#include <Solid/Device>
+#include <QStandardPaths>
// Local
#include "dialogpage.h"
@@ -183,7 +184,7 @@ ImportDialog::ImportDialog()
KUrl url = ImporterConfig::destinationUrl();
if (!url.isValid()) {
- url = KUrl::fromPath(KGlobalSettings::picturesPath());
+ url = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::PicturesLocation));
int year = QDate::currentDate().year();
url.addPath(QString::number(year));
}
@@ -243,7 +244,7 @@ void ImportDialog::startImport()
{
KUrl url = d->mThumbnailPage->destinationUrl();
ImporterConfig::setDestinationUrl(url);
- ImporterConfig::self()->writeConfig();
+ ImporterConfig::self()->save();
d->mCentralWidget->setCurrentWidget(d->mProgressPage);
d->mImporter->setAutoRenameFormat(
diff --git a/importer/importer.cpp b/importer/importer.cpp
index bd224ad..25bb4ee 100644
--- a/importer/importer.cpp
+++ b/importer/importer.cpp
@@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <fileutils.h>
#include <filenameformater.h>
#include <lib/timeutils.h>
+#include <QDir>
namespace Gwenview
{
@@ -76,7 +77,7 @@ struct ImporterPrivate
Q_ASSERT(url.isLocalFile());
// FIXME: Support remote urls
- if (!KStandardDirs::makeDir(url.toLocalFile())) {
+ if (!QDir().mkpath(url.toLocalFile())) {
emitError(i18n("Could not create destination folder."));
return false;
}
diff --git a/importer/importerconfigdialog.cpp b/importer/importerconfigdialog.cpp
index 590e41f..87619f1 100644
--- a/importer/importerconfigdialog.cpp
+++ b/importer/importerconfigdialog.cpp
@@ -51,7 +51,7 @@ struct ImporterConfigDialogPrivate : public Ui_ImporterConfigDialog
end = map.constEnd();
for (; it != end; ++it) {
QString keyword = '{' + it.key() + '}';
- QString explanation = Qt::escape(it.value());
+ QString explanation = it.value().toHtmlEscaped();
QString link = QString("<a href='%1'>%1</a>").arg(keyword);
helpText += "<li>" + i18nc("%1 is the importer keyword, %2 is keyword explanation", "%1: %2", link, explanation) + "</li>";
}
@@ -96,7 +96,7 @@ void ImporterConfigDialog::slotHelpLinkActivated(const QString& keyword)
void ImporterConfigDialog::updatePreview()
{
FileNameFormater formater(d->kcfg_AutoRenameFormat->text());
- d->mPreviewOutputLabel->setText(formater.format(KUrl::fromPath('/' + PREVIEW_FILENAME), PREVIEW_DATETIME));
+ d->mPreviewOutputLabel->setText(formater.format(QUrl::fromLocalFile('/' + PREVIEW_FILENAME), PREVIEW_DATETIME));
}
} // namespace
diff --git a/importer/thumbnailpage.cpp b/importer/thumbnailpage.cpp
index f689e55..31e1d7f 100644
--- a/importer/thumbnailpage.cpp
+++ b/importer/thumbnailpage.cpp
@@ -232,7 +232,7 @@ ThumbnailPage::ThumbnailPage()
: d(new ThumbnailPagePrivate)
{
d->q = this;
- d->mUrlMap.setConfigGroup(KConfigGroup(KGlobal::config(), URL_FOR_BASE_URL_GROUP));
+ d->mUrlMap.setConfigGroup(KConfigGroup(KSharedConfig::openConfig(), URL_FOR_BASE_URL_GROUP));
d->setupUi(this);
d->setupIcons();
d->setupDirModel();
diff --git a/lib/crop/cropwidget.cpp b/lib/crop/cropwidget.cpp
index 2e5cf04..f01dc61 100644
--- a/lib/crop/cropwidget.cpp
+++ b/lib/crop/cropwidget.cpp
@@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Local
#include <lib/documentview/rasterimageview.h>
+#include <QFontDatabase>
#include "croptool.h"
#include "signalblocker.h"
#include "ui_cropwidget.h"
@@ -205,7 +206,7 @@ CropWidget::CropWidget(QWidget* parent, RasterImageView* imageView, CropTool* cr
d->mUpdatingFromCropTool = false;
d->mCropTool = cropTool;
d->setupUi(this);
- setFont(KGlobalSettings::smallestReadableFont());
+ setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
layout()->setMargin(KDialog::marginHint());
layout()->setSizeConstraint(QLayout::SetFixedSize);