Commit f815359d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove some kde4support

parent 0db893e5
......@@ -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();
}
......
......@@ -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);
......
......@@ -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(
......
......@@ -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;
}
......
......@@ -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
......@@ -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();
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment