Commit 984af18b authored by Boudewijn Rempt's avatar Boudewijn Rempt

Port Krita to use KoResourcePaths

parent 02f6e3e8
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <calligraversion.h> #include <calligraversion.h>
#include <calligragitversion.h> #include <calligragitversion.h>
...@@ -98,11 +98,11 @@ void doRestart(MainWindow* mainWindow, bool resetConfig) ...@@ -98,11 +98,11 @@ void doRestart(MainWindow* mainWindow, bool resetConfig)
configDir.remove("kritarc"); configDir.remove("kritarc");
} }
{ {
QDir inputDir(KGlobal::dirs()->saveLocation("data", "krita/input/")); QDir inputDir(KoResourcePaths::saveLocation("data", "krita/input/"));
foreach(QString entry, inputDir.entryList(QStringList("*.profile"))) { foreach(QString entry, inputDir.entryList(QStringList("*.profile"))) {
inputDir.remove(entry); inputDir.remove(entry);
} }
QDir configDir(KGlobal::dirs()->saveLocation("config")); QDir configDir(KoResourcePaths::saveLocation("config"));
configDir.remove("kritarc"); configDir.remove("kritarc");
} }
} }
...@@ -224,7 +224,7 @@ MainWindow::MainWindow(const QString &dumpPath, const QString &id, QWidget *pare ...@@ -224,7 +224,7 @@ MainWindow::MainWindow(const QString &dumpPath, const QString &id, QWidget *pare
setupUi(this); setupUi(this);
progressBar->hide(); progressBar->hide();
lblKiki->setPixmap(QPixmap(KGlobal::dirs()->findResource("data", "krita/pics/KikiNurse_sm.png"))); lblKiki->setPixmap(QPixmap(KoResourcePaths::findResource("data", "krita/pics/KikiNurse_sm.png")));
setWindowFlags(Qt::WindowStaysOnTopHint | windowFlags()); setWindowFlags(Qt::WindowStaysOnTopHint | windowFlags());
...@@ -321,7 +321,7 @@ void MainWindow::startUpload() ...@@ -321,7 +321,7 @@ void MainWindow::startUpload()
#endif #endif
QFile f(QDesktopServices::storageLocation(QDesktopServices::TempLocation) + "/krita-opengl.txt"); QFile f(QDesktopServices::storageLocation(QDesktopServices::TempLocation) + "/krita-opengl.txt");
dbgKrita << KGlobal::dirs()->saveLocation("config") + "/krita-opengl.txt" << f.exists(); dbgKrita << KoResourcePaths::saveLocation("config") + "/krita-opengl.txt" << f.exists();
if (f.exists()) { if (f.exists()) {
f.open(QFile::ReadOnly); f.open(QFile::ReadOnly);
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QUrl> #include <QUrl>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kactioncollection.h> #include <kactioncollection.h>
#include <QMessageBox> #include <QMessageBox>
#include <kmenubar.h> #include <kmenubar.h>
...@@ -168,8 +168,8 @@ public: ...@@ -168,8 +168,8 @@ public:
sketchView->engine()->addImportPath(appdir.canonicalPath() + "/lib64/calligra/imports"); sketchView->engine()->addImportPath(appdir.canonicalPath() + "/lib64/calligra/imports");
QString mainqml = appdir.canonicalPath() + "/share/apps/kritagemini/kritagemini.qml"; QString mainqml = appdir.canonicalPath() + "/share/apps/kritagemini/kritagemini.qml";
#else #else
sketchView->engine()->addImportPath(KGlobal::dirs()->findDirs("lib", "calligra/imports").value(0)); sketchView->engine()->addImportPath(KoResourcePaths::findDirs("lib", "calligra/imports").value(0));
QString mainqml = KGlobal::dirs()->findResource("data", "kritagemini/kritagemini.qml"); QString mainqml = KoResourcePaths::findResource("data", "kritagemini/kritagemini.qml");
#endif #endif
Q_ASSERT(QFile::exists(mainqml)); Q_ASSERT(QFile::exists(mainqml));
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kiconloader.h> #include <kiconloader.h>
#include "data/splash/splash_screen.xpm" #include "data/splash/splash_screen.xpm"
#include "MainWindow.h" #include "MainWindow.h"
......
...@@ -304,7 +304,7 @@ set(einspline_SRCS ...@@ -304,7 +304,7 @@ set(einspline_SRCS
add_library(kritaimage SHARED ${kritaimage_LIB_SRCS} ${einspline_SRCS}) add_library(kritaimage SHARED ${kritaimage_LIB_SRCS} ${einspline_SRCS})
generate_export_header(kritaimage BASE_NAME kritaimage) generate_export_header(kritaimage BASE_NAME kritaimage)
target_link_libraries(kritaimage koversion kritaglobal kritapsd koodf pigmentcms kundo2 kowidgetutils Qt5::Concurrent) target_link_libraries(kritaimage koversion kowidgets kritaglobal kritapsd koodf pigmentcms kundo2 kowidgetutils Qt5::Concurrent)
target_link_libraries(kritaimage LINK_INTERFACE_LIBRARIES koversion kritaglobal kritapsd koodf pigmentcms kundo2 kowidgetutils Qt5::Concurrent) target_link_libraries(kritaimage LINK_INTERFACE_LIBRARIES koversion kritaglobal kritapsd koodf pigmentcms kundo2 kowidgetutils Qt5::Concurrent)
target_link_libraries(kritaimage ${Boost_SYSTEM_LIBRARY}) target_link_libraries(kritaimage ${Boost_SYSTEM_LIBRARY})
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <QString> #include <QString>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include "kis_debug.h" #include "kis_debug.h"
#include "kis_meta_data_schema_p.h" #include "kis_meta_data_schema_p.h"
...@@ -50,10 +50,10 @@ SchemaRegistry::SchemaRegistry() ...@@ -50,10 +50,10 @@ SchemaRegistry::SchemaRegistry()
: d(new Private) : d(new Private)
{ {
KGlobal::dirs()->addResourceType("metadata_schema", "data", "krita/metadata/schemas/"); KoResourcePaths::addResourceType("metadata_schema", "data", "krita/metadata/schemas/");
QStringList schemasFilenames; QStringList schemasFilenames;
schemasFilenames += KGlobal::dirs()->findAllResources("metadata_schema", "*.schema"); schemasFilenames += KoResourcePaths::findAllResources("metadata_schema", "*.schema");
foreach(const QString& fileName, schemasFilenames) { foreach(const QString& fileName, schemasFilenames) {
Schema* schema = new Schema(); Schema* schema = new Schema();
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <QApplication> #include <QApplication>
#include <QGlobalStatic> #include <QGlobalStatic>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <KoResource.h> #include <KoResource.h>
#include <KoResourceServerProvider.h> #include <KoResourceServerProvider.h>
...@@ -121,9 +121,9 @@ private: ...@@ -121,9 +121,9 @@ private:
KisBrushServer::KisBrushServer() KisBrushServer::KisBrushServer()
{ {
KGlobal::dirs()->addResourceType("kis_brushes", "data", "krita/brushes/"); KoResourcePaths::addResourceType("kis_brushes", "data", "krita/brushes/");
KGlobal::dirs()->addResourceDir("kis_brushes", "/usr/share/create/brushes/gimp"); KoResourcePaths::addResourceDir("kis_brushes", "/usr/share/create/brushes/gimp");
KGlobal::dirs()->addResourceDir("kis_brushes", QDir::homePath() + QString("/.create/brushes/gimp")); KoResourcePaths::addResourceDir("kis_brushes", QDir::homePath() + QString("/.create/brushes/gimp"));
m_brushServer = new BrushResourceServer(); m_brushServer = new BrushResourceServer();
if (!QFileInfo(m_brushServer->saveLocation()).exists()) { if (!QFileInfo(m_brushServer->saveLocation()).exists()) {
......
...@@ -99,7 +99,7 @@ TasksetDockerDock::TasksetDockerDock( ) : QDockWidget(i18n("Task Sets")), m_canv ...@@ -99,7 +99,7 @@ TasksetDockerDock::TasksetDockerDock( ) : QDockWidget(i18n("Task Sets")), m_canv
chooserButton->setIcon(KisIconUtils::loadIcon("edit-copy")); chooserButton->setIcon(KisIconUtils::loadIcon("edit-copy"));
KGlobal::dirs()->addResourceType("kis_taskset", "data", "krita/taskset/"); KoResourcePaths::addResourceType("kis_taskset", "data", "krita/taskset/");
m_rserver = new KoResourceServerSimpleConstruction<TasksetResource>("kis_taskset", "*.kts"); m_rserver = new KoResourceServerSimpleConstruction<TasksetResource>("kis_taskset", "*.kts");
if (!QFileInfo(m_rserver->saveLocation()).exists()) { if (!QFileInfo(m_rserver->saveLocation()).exists()) {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <QMessageBox> #include <QMessageBox>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kis_debug.h> #include <kis_debug.h>
#include <kpluginfactory.h> #include <kpluginfactory.h>
#include <QTime> #include <QTime>
...@@ -91,8 +91,8 @@ KisGmicPlugin::KisGmicPlugin(QObject *parent, const QVariantList &) ...@@ -91,8 +91,8 @@ KisGmicPlugin::KisGmicPlugin(QObject *parent, const QVariantList &)
connect(action, SIGNAL(triggered()), this, SLOT(slotShowGmicDialog())); connect(action, SIGNAL(triggered()), this, SLOT(slotShowGmicDialog()));
addAction("gmic", action); addAction("gmic", action);
KGlobal::dirs()->addResourceType("gmic_definitions", "data", "krita/gmic/"); KoResourcePaths::addResourceType("gmic_definitions", "data", "krita/gmic/");
m_blacklistPath = KGlobal::dirs()->findResource("gmic_definitions", STANDARD_GMIC_DEFINITION + ".blacklist"); m_blacklistPath = KoResourcePaths::findResource("gmic_definitions", STANDARD_GMIC_DEFINITION + ".blacklist");
dumpCompiletimeFeatures(); dumpCompiletimeFeatures();
...@@ -141,7 +141,7 @@ void KisGmicPlugin::dumpCompiletimeFeatures() ...@@ -141,7 +141,7 @@ void KisGmicPlugin::dumpCompiletimeFeatures()
void KisGmicPlugin::setupDefinitionPaths() void KisGmicPlugin::setupDefinitionPaths()
{ {
m_definitionFilePaths = KGlobal::dirs()->findAllResources("gmic_definitions", "*.gmic"); m_definitionFilePaths = KoResourcePaths::findAllResources("gmic_definitions", "*.gmic");
QMutableStringListIterator it(m_definitionFilePaths); QMutableStringListIterator it(m_definitionFilePaths);
// remove all instances of gmic_def.gmic and updateXXXX.gmic, they cause problems when merged/mixed // remove all instances of gmic_def.gmic and updateXXXX.gmic, they cause problems when merged/mixed
...@@ -162,10 +162,10 @@ void KisGmicPlugin::setupDefinitionPaths() ...@@ -162,10 +162,10 @@ void KisGmicPlugin::setupDefinitionPaths()
// if we don't have updateXXXX.gmic for current version, prepend standard gmic_def.gmic // if we don't have updateXXXX.gmic for current version, prepend standard gmic_def.gmic
int gmicVersion = gmic_version; int gmicVersion = gmic_version;
QString updateFileName = "update" + QString::number(gmicVersion) + ".gmic"; QString updateFileName = "update" + QString::number(gmicVersion) + ".gmic";
QString updatedGmicDefinitionFilePath = KGlobal::dirs()->findResource("gmic_definitions", updateFileName); QString updatedGmicDefinitionFilePath = KoResourcePaths::findResource("gmic_definitions", updateFileName);
if (updatedGmicDefinitionFilePath.isEmpty()) if (updatedGmicDefinitionFilePath.isEmpty())
{ {
QString standardGmicDefinitionFilePath = KGlobal::dirs()->findResource("gmic_definitions", STANDARD_GMIC_DEFINITION); QString standardGmicDefinitionFilePath = KoResourcePaths::findResource("gmic_definitions", STANDARD_GMIC_DEFINITION);
m_definitionFilePaths.prepend(standardGmicDefinitionFilePath); m_definitionFilePaths.prepend(standardGmicDefinitionFilePath);
} }
else else
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <gmic.h> #include <gmic.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
KisGmicUpdater::KisGmicUpdater(const QString &updateurl, QObject *parent): QObject(parent),m_url(updateurl) KisGmicUpdater::KisGmicUpdater(const QString &updateurl, QObject *parent): QObject(parent),m_url(updateurl)
{ {
...@@ -72,7 +72,7 @@ void KisGmicUpdater::finishedDownload(QNetworkReply*reply) ...@@ -72,7 +72,7 @@ void KisGmicUpdater::finishedDownload(QNetworkReply*reply)
dbgPlugins << "bytes available: " << reply->bytesAvailable(); dbgPlugins << "bytes available: " << reply->bytesAvailable();
dbgPlugins << reply->url() << " finished"; dbgPlugins << reply->url() << " finished";
QString path = KGlobal::dirs()->saveLocation("gmic_definitions"); QString path = KoResourcePaths::saveLocation("gmic_definitions");
QString fileName = reply->url().path().split("/").last(); QString fileName = reply->url().path().split("/").last();
QByteArray data = reply->readAll(); QByteArray data = reply->readAll();
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include <kis_gmic_applicator.h> #include <kis_gmic_applicator.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <QDomDocument> #include <QDomDocument>
#include <kis_group_layer.h> #include <kis_group_layer.h>
...@@ -76,11 +76,11 @@ const static QString BLACKLIST("gmic_def.gmic.blacklist"); ...@@ -76,11 +76,11 @@ const static QString BLACKLIST("gmic_def.gmic.blacklist");
void KisGmicTests::initTestCase() void KisGmicTests::initTestCase()
{ {
KGlobal::dirs()->addResourceType("gmic_definitions", "data", "krita/gmic/"); KoResourcePaths::addResourceType("gmic_definitions", "data", "krita/gmic/");
QString standardSettings("gmic_def.gmic"); QString standardSettings("gmic_def.gmic");
QString definitionFilePath = KGlobal::dirs()->findResource("gmic_definitions", STANDARD_SETTINGS); QString definitionFilePath = KoResourcePaths::findResource("gmic_definitions", STANDARD_SETTINGS);
m_blacklistFilePath = KGlobal::dirs()->findResource("gmic_definitions", STANDARD_SETTINGS + ".blacklist"); m_blacklistFilePath = KoResourcePaths::findResource("gmic_definitions", STANDARD_SETTINGS + ".blacklist");
QStringList filePaths; QStringList filePaths;
filePaths << definitionFilePath; filePaths << definitionFilePath;
...@@ -631,7 +631,7 @@ void KisGmicTests::testFilterOnlySelection() ...@@ -631,7 +631,7 @@ void KisGmicTests::testFilterOnlySelection()
void KisGmicTests::testLoadingGmicCommands() void KisGmicTests::testLoadingGmicCommands()
{ {
QString definitionFilePath = KGlobal::dirs()->findResource("gmic_definitions", STANDARD_SETTINGS); QString definitionFilePath = KoResourcePaths::findResource("gmic_definitions", STANDARD_SETTINGS);
QByteArray data = KisGmicParser::extractGmicCommandsOnly(definitionFilePath); QByteArray data = KisGmicParser::extractGmicCommandsOnly(definitionFilePath);
QVERIFY(data.size() > 0); QVERIFY(data.size() > 0);
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <QFile> #include <QFile>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kis_debug.h> #include <kis_debug.h>
...@@ -51,7 +51,7 @@ KisMetaDataEditor::KisMetaDataEditor(QWidget* parent, KisMetaData::Store* origin ...@@ -51,7 +51,7 @@ KisMetaDataEditor::KisMetaDataEditor(QWidget* parent, KisMetaData::Store* origin
d->originalStore = originalStore; d->originalStore = originalStore;
d->store = new KisMetaData::Store(*originalStore); d->store = new KisMetaData::Store(*originalStore);
QStringList files = KGlobal::dirs()->findAllResources("data", "kritaplugins/metadataeditor/*.rc"); QStringList files = KoResourcePaths::findAllResources("data", "kritaplugins/metadataeditor/*.rc");
QMap<QString, QWidget*> widgets; QMap<QString, QWidget*> widgets;
widgets["dublincore.ui"] = new WdgDublinCore(this); widgets["dublincore.ui"] = new WdgDublinCore(this);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <QScopedPointer> #include <QScopedPointer>
#include <QProcessEnvironment> #include <QProcessEnvironment>
...@@ -288,7 +288,7 @@ bool ResourceBundle::save() ...@@ -288,7 +288,7 @@ bool ResourceBundle::save()
addMeta("updated", QDate::currentDate().toString("dd/MM/yyyy")); addMeta("updated", QDate::currentDate().toString("dd/MM/yyyy"));
QDir bundleDir = KGlobal::dirs()->saveLocation("data", "krita/bundles"); QDir bundleDir = KoResourcePaths::saveLocation("data", "krita/bundles");
bundleDir.cdUp(); bundleDir.cdUp();
QScopedPointer<KoStore> store(KoStore::createStore(filename(), KoStore::Write, "application/x-krita-resourcebundle", KoStore::Zip)); QScopedPointer<KoStore> store(KoStore::createStore(filename(), KoStore::Write, "application/x-krita-resourcebundle", KoStore::Zip));
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <QGlobalStatic> #include <QGlobalStatic>
#include <klocalizedstring.h> #include <klocalizedstring.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kpluginfactory.h> #include <kpluginfactory.h>
#include <KoFileDialog.h> #include <KoFileDialog.h>
...@@ -53,8 +53,8 @@ Q_GLOBAL_STATIC(ResourceBundleServerProvider, s_instance) ...@@ -53,8 +53,8 @@ Q_GLOBAL_STATIC(ResourceBundleServerProvider, s_instance)
ResourceBundleServerProvider::ResourceBundleServerProvider() ResourceBundleServerProvider::ResourceBundleServerProvider()
{ {
// user-local // user-local
KGlobal::dirs()->addResourceType("kis_resourcebundles", "data", "krita/bundles/"); KoResourcePaths::addResourceType("kis_resourcebundles", "data", "krita/bundles/");
KGlobal::dirs()->addResourceDir("kis_resourcebundles", QDir::homePath() + QString("/.create/bundles")); KoResourcePaths::addResourceDir("kis_resourcebundles", QDir::homePath() + QString("/.create/bundles"));
m_resourceBundleServer = new KoResourceServerSimpleConstruction<ResourceBundle>("kis_resourcebundles", "*.bundle"); m_resourceBundleServer = new KoResourceServerSimpleConstruction<ResourceBundle>("kis_resourcebundles", "*.bundle");
if (!QFileInfo(m_resourceBundleServer->saveLocation()).exists()) { if (!QFileInfo(m_resourceBundleServer->saveLocation()).exists()) {
QDir().mkpath(m_resourceBundleServer->saveLocation()); QDir().mkpath(m_resourceBundleServer->saveLocation());
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <QPushButton> #include <QPushButton>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kis_debug.h> #include <kis_debug.h>
#include "kis_image.h" #include "kis_image.h"
...@@ -120,7 +120,7 @@ void KisClipboardBrushWidget::slotAddPredefined() ...@@ -120,7 +120,7 @@ void KisClipboardBrushWidget::slotAddPredefined()
if(!m_brush) if(!m_brush)
return; return;
QString dir = KGlobal::dirs()->saveLocation("data", "krita/brushes"); QString dir = KoResourcePaths::saveLocation("data", "krita/brushes");
QString extension = ".gbr"; QString extension = ".gbr";
QString name = nameEdit->text(); QString name = nameEdit->text();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <QPixmap> #include <QPixmap>
#include <QShowEvent> #include <QShowEvent>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include "kis_image.h" #include "kis_image.h"
#include "kis_layer.h" #include "kis_layer.h"
...@@ -120,7 +120,7 @@ void KisCustomBrushWidget::slotAddPredefined() ...@@ -120,7 +120,7 @@ void KisCustomBrushWidget::slotAddPredefined()
{ {
// Save in the directory that is likely to be: ~/.kde/share/apps/krita/brushes // Save in the directory that is likely to be: ~/.kde/share/apps/krita/brushes
// a unique file with this brushname // a unique file with this brushname
QString dir = KGlobal::dirs()->saveLocation("data", "krita/brushes"); QString dir = KoResourcePaths::saveLocation("data", "krita/brushes");
QString extension; QString extension;
if (brushStyle->currentIndex() == 0) { if (brushStyle->currentIndex() == 0) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <QPoint> #include <QPoint>
#include "kis_global.h" #include "kis_global.h"
#include <kstandarddirs.h> #include <KoResourcePaths.h>
KisNormalPreviewWidget::KisNormalPreviewWidget(QWidget *parent) KisNormalPreviewWidget::KisNormalPreviewWidget(QWidget *parent)
: QLabel(parent) : QLabel(parent)
...@@ -32,8 +32,8 @@ KisNormalPreviewWidget::KisNormalPreviewWidget(QWidget *parent) ...@@ -32,8 +32,8 @@ KisNormalPreviewWidget::KisNormalPreviewWidget(QWidget *parent)
m_redChannel = 0; m_redChannel = 0;
m_greenChannel = 2; m_greenChannel = 2;
m_blueChannel = 4; m_blueChannel = 4;
//TODO: this can be changed in frameworks to KGlobal::dirs()->findResource("kis_images", "krita-tangetnormal.png"); //TODO: this can be changed in frameworks to KoResourcePaths::findResource("kis_images", "krita-tangetnormal.png");
m_fileName = KGlobal::dirs()->findResource("kis_images", "krita-tangentnormal-preview.png"); m_fileName = KoResourcePaths::findResource("kis_images", "krita-tangentnormal-preview.png");
QImage preview = QImage(m_fileName); QImage preview = QImage(m_fileName);
setPixmap(QPixmap::fromImage(preview.scaled(200, 200, Qt::KeepAspectRatio, Qt::SmoothTransformation))); setPixmap(QPixmap::fromImage(preview.scaled(200, 200, Qt::KeepAspectRatio, Qt::SmoothTransformation)));
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "ui_wdgtangenttiltoption.h" #include "ui_wdgtangenttiltoption.h"
#include "kis_global.h" #include "kis_global.h"
#include <kstandarddirs.h> #include <KoResourcePaths.h>
class KisTangentTiltOptionWidget: public QWidget, public Ui::WdgTangentTiltOptions class KisTangentTiltOptionWidget: public QWidget, public Ui::WdgTangentTiltOptions
{ {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <QPainter> #include <QPainter>
#include <QMatrix4x4> #include <QMatrix4x4>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include "kis_coordinates_converter.h" #include "kis_coordinates_converter.h"
#include "tool_transform_args.h" #include "tool_transform_args.h"
...@@ -73,7 +73,7 @@ struct KisFreeTransformStrategy::Private ...@@ -73,7 +73,7 @@ struct KisFreeTransformStrategy::Private
scaleCursors[6] = KisCursor::sizeVerCursor(); scaleCursors[6] = KisCursor::sizeVerCursor();
scaleCursors[7] = KisCursor::sizeBDiagCursor(); scaleCursors[7] = KisCursor::sizeBDiagCursor();
shearCursorPixmap.load(KStandardDirs::locate("data", "calligra/icons/cursor_shear.png")); shearCursorPixmap.load(KoResourcePaths::locate("data", "calligra/icons/cursor_shear.png"));
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <QTimer> #include <QTimer>
#include <QUrl> #include <QUrl>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <KoDialog.h> #include <KoDialog.h>
#include <kis_debug.h> #include <kis_debug.h>
...@@ -122,8 +122,8 @@ MainWindow::MainWindow(QStringList fileNames, QWidget* parent, Qt::WindowFlags f ...@@ -122,8 +122,8 @@ MainWindow::MainWindow(QStringList fileNames, QWidget* parent, Qt::WindowFlags f
view->engine()->addImportPath(appdir.canonicalPath() + "/lib64/calligra/imports"); view->engine()->addImportPath(appdir.canonicalPath() + "/lib64/calligra/imports");
QString mainqml = appdir.canonicalPath() + "/share/apps/kritasketch/kritasketch.qml"; QString mainqml = appdir.canonicalPath() + "/share/apps/kritasketch/kritasketch.qml";
#else #else
view->engine()->addImportPath(KGlobal::dirs()->findDirs("lib", "calligra/imports").value(0)); view->engine()->addImportPath(KoResourcePaths::findDirs("lib", "calligra/imports").value(0));
QString mainqml = KGlobal::dirs()->findResource("data", "kritasketch/kritasketch.qml"); QString mainqml = KoResourcePaths::findResource("data", "kritasketch/kritasketch.qml");
#endif #endif
Q_ASSERT(QFile::exists(mainqml)); Q_ASSERT(QFile::exists(mainqml));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <QDeclarativeItem> #include <QDeclarativeItem>
#include <QSettings> #include <QSettings>
#include <QCoreApplication> #include <QCoreApplication>
#include <KStandardDirs> #include <KoResourcePaths.h>
#include <kis_config.h> #include <kis_config.h>
...@@ -47,7 +47,7 @@ PanelConfiguration::~PanelConfiguration() ...@@ -47,7 +47,7 @@ PanelConfiguration::~PanelConfiguration()
void PanelConfiguration::componentComplete() void PanelConfiguration::componentComplete()
{ {
QString configFile = KStandardDirs::locate("config", "kritasketchpanelsrc"); QString configFile = KoResourcePaths::locate("config", "kritasketchpanelsrc");
QSettings panelConfig(configFile, QSettings::IniFormat); QSettings panelConfig(configFile, QSettings::IniFormat);
int count = panelConfig.beginReadArray("Panels"); int count = panelConfig.beginReadArray("Panels");
...@@ -99,7 +99,7 @@ void PanelConfiguration::restore() ...@@ -99,7 +99,7 @@ void PanelConfiguration::restore()
void PanelConfiguration::save() void PanelConfiguration::save()
{ {
QString configFile = KStandardDirs::locateLocal("config", "kritasketchpanelsrc"); QString configFile = KoResourcePaths::locateLocal("config", "kritasketchpanelsrc");
QSettings panelConfig(configFile, QSettings::IniFormat); QSettings panelConfig(configFile, QSettings::IniFormat);
panelConfig.beginWriteArray("Panels"); panelConfig.beginWriteArray("Panels");
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kdesktopfile.h> #include <kdesktopfile.h>
#include <QMessageBox> #include <QMessageBox>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kis_debug.h> #include <kis_debug.h>
#include <kmimetype.h> #include <kmimetype.h>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <QDeclarativeComponent> #include <QDeclarativeComponent>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <QUrl> #include <QUrl>
#include "QmlGlobalEngine.h" #include "QmlGlobalEngine.h"
...@@ -104,7 +104,7 @@ void Theme::setId(const QString& newValue) ...@@ -104,7 +104,7 @@ void Theme::setId(const QString& newValue)
{ {
if(newValue != d->id) { if(newValue != d->id) {
d->id = newValue; d->id = newValue;
d->basePath = QUrl(KGlobal::dirs()->findResource("data", QString("kritasketch/themes/%1/theme.qml").arg(d->id))).directory(); d->basePath = QUrl(KoResourcePaths::findResource("data", QString("kritasketch/themes/%1/theme.qml").arg(d->id))).directory();
emit idChanged(); emit idChanged();
} }
} }
...@@ -363,7 +363,7 @@ Theme* Theme::load(const QString& id, QObject* parent) ...@@ -363,7 +363,7 @@ Theme* Theme::load(const QString& id, QObject* parent)
appdir.cdUp(); appdir.cdUp();
qml = QString("%1/share/apps/kritasketch/themes/%2/theme.qml").arg(appdir.canonicalPath(), id); qml = QString("%1/share/apps/kritasketch/themes/%2/theme.qml").arg(appdir.canonicalPath(), id);
#else #else
qml = KGlobal::dirs()->findResource("data", QString("kritasketch/themes/%1/theme.qml").arg(id)); qml = KoResourcePaths::findResource("data", QString("kritasketch/themes/%1/theme.qml").arg(id));
#endif #endif
QDeclarativeComponent themeComponent(QmlGlobalEngine::instance()->engine(), parent); QDeclarativeComponent themeComponent(QmlGlobalEngine::instance()->engine(), parent);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <kaboutdata.h> #include <kaboutdata.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kstandarddirs.h> #include <KoResourcePaths.h>
#include <kiconloader.h> #include <kiconloader.h>
#include "MainWindow.h" #include "MainWindow.h"
......
...@@ -447,7 +447,7 @@ QT5_WRAP_CPP(kritaui_HEADERS_MOC KisDocumentSectionPropertyAction_p.h) ...@@ -447,7 +447,7 @@ QT5_WRAP_CPP(kritaui_HEADERS_MOC KisDocumentSectionPropertyAction_p.h)
add_library(kritaui SHARED ${kritaui_HEADERS_MOC} ${kritaui_LIB_SRCS} ) add_library(kritaui SHARED ${kritaui_HEADERS_MOC} ${kritaui_LIB_SRCS} )
generate_export_header(kritaui BASE_NAME kritaui) generate_export_header(kritaui BASE_NAME kritaui)
target_link_libraries(kritaui KF5::GlobalAccel KF5::I18n ) target_link_libraries(kritaui KF5::GlobalAccel KF5::I18n KF5::KDELibs4Support)
if (NOT WIN32) if (NOT WIN32)
target_link_libraries