Commit 469bcebd authored by Rafał Malinowski's avatar Rafał Malinowski

misc: rename KaduPaths to PathsProvider

Signed-off-by: Rafał Malinowski's avatarRafał Malinowski <rafal.przemyslaw.malinowski@gmail.com>
parent f1249a8c
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "buddies/buddy.h" #include "buddies/buddy.h"
#include "contacts/contact.h" #include "contacts/contact.h"
#include "misc/change-notifier.h" #include "misc/change-notifier.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "avatar-shared.h" #include "avatar-shared.h"
...@@ -51,7 +51,7 @@ AvatarShared * AvatarShared::loadFromStorage(const std::shared_ptr<StoragePoint> ...@@ -51,7 +51,7 @@ AvatarShared * AvatarShared::loadFromStorage(const std::shared_ptr<StoragePoint>
AvatarShared::AvatarShared(const QUuid &uuid) : AvatarShared::AvatarShared(const QUuid &uuid) :
Shared(uuid) Shared(uuid)
{ {
AvatarsDir = KaduPaths::instance()->profilePath() + QLatin1String("avatars/"); AvatarsDir = PathsProvider::instance()->profilePath() + QLatin1String("avatars/");
connect(&changeNotifier(), SIGNAL(changed()), this, SIGNAL(updated())); connect(&changeNotifier(), SIGNAL(changed()), this, SIGNAL(updated()));
} }
...@@ -142,7 +142,7 @@ void AvatarShared::storeAvatar() ...@@ -142,7 +142,7 @@ void AvatarShared::storeAvatar()
storeValue("LastUpdated", LastUpdated); storeValue("LastUpdated", LastUpdated);
storeValue("NextUpdate", NextUpdate); storeValue("NextUpdate", NextUpdate);
QDir avatarsDir(KaduPaths::instance()->profilePath() + QLatin1String("avatars")); QDir avatarsDir(PathsProvider::instance()->profilePath() + QLatin1String("avatars"));
if (!avatarsDir.exists()) if (!avatarsDir.exists())
avatarsDir.mkpath(QLatin1String(".")); avatarsDir.mkpath(QLatin1String("."));
...@@ -172,7 +172,7 @@ void AvatarShared::storeSmallPixmap() ...@@ -172,7 +172,7 @@ void AvatarShared::storeSmallPixmap()
if (!isValidStorage()) if (!isValidStorage())
return; return;
QDir avatarsDir(KaduPaths::instance()->profilePath() + QLatin1String("avatars")); QDir avatarsDir(PathsProvider::instance()->profilePath() + QLatin1String("avatars"));
if (!avatarsDir.exists()) if (!avatarsDir.exists())
avatarsDir.mkpath(QLatin1String(".")); avatarsDir.mkpath(QLatin1String("."));
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
#include "contacts/contact.h" #include "contacts/contact.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "avatar.h" #include "avatar.h"
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "gui/widgets/configuration/configuration-widget.h" #include "gui/widgets/configuration/configuration-widget.h"
#include "gui/windows/main-configuration-window.h" #include "gui/windows/main-configuration-window.h"
#include "misc/algorithm.h" #include "misc/algorithm.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "misc/memory.h" #include "misc/memory.h"
#include "kadu-application.h" #include "kadu-application.h"
...@@ -252,7 +252,7 @@ void ChatStyleManager::loadStyles() ...@@ -252,7 +252,7 @@ void ChatStyleManager::loadStyles()
QFileInfo fi; QFileInfo fi;
QStringList files; QStringList files;
path = KaduPaths::instance()->profilePath() + QLatin1String("syntax/chat/"); path = PathsProvider::instance()->profilePath() + QLatin1String("syntax/chat/");
dir.setPath(path); dir.setPath(path);
files = dir.entryList(); files = dir.entryList();
...@@ -277,7 +277,7 @@ void ChatStyleManager::loadStyles() ...@@ -277,7 +277,7 @@ void ChatStyleManager::loadStyles()
} }
} }
path = KaduPaths::instance()->dataPath() + QLatin1String("syntax/chat/"); path = PathsProvider::instance()->dataPath() + QLatin1String("syntax/chat/");
dir.setPath(path); dir.setPath(path);
files = dir.entryList(); files = dir.entryList();
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "chat-style/engine/adium/adium-style.h" #include "chat-style/engine/adium/adium-style.h"
#include "chat-style/engine/adium/adium-style-renderer-factory.h" #include "chat-style/engine/adium/adium-style-renderer-factory.h"
#include "message/message-html-renderer-service.h" #include "message/message-html-renderer-service.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "misc/memory.h" #include "misc/memory.h"
#include <QtCore/QDir> #include <QtCore/QDir>
...@@ -66,9 +66,9 @@ QString AdiumStyleEngine::defaultVariant(const QString &styleName) ...@@ -66,9 +66,9 @@ QString AdiumStyleEngine::defaultVariant(const QString &styleName)
QStringList AdiumStyleEngine::styleVariants(QString styleName) QStringList AdiumStyleEngine::styleVariants(QString styleName)
{ {
QDir dir; QDir dir;
QString styleBaseHref = KaduPaths::instance()->profilePath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/Variants/"); QString styleBaseHref = PathsProvider::instance()->profilePath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/Variants/");
if (!dir.exists(styleBaseHref)) if (!dir.exists(styleBaseHref))
styleBaseHref = KaduPaths::instance()->dataPath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/Variants/"); styleBaseHref = PathsProvider::instance()->dataPath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/Variants/");
dir.setPath(styleBaseHref); dir.setPath(styleBaseHref);
dir.setNameFilters(QStringList("*.css")); dir.setNameFilters(QStringList("*.css"));
return dir.entryList(); return dir.entryList();
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "message/message-render-info.h" #include "message/message-render-info.h"
#include "message/message-render-info-factory.h" #include "message/message-render-info-factory.h"
#include "misc/date-time.h" #include "misc/date-time.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "misc/misc.h" #include "misc/misc.h"
#include "protocols/protocol.h" #include "protocols/protocol.h"
#include "protocols/protocol-factory.h" #include "protocols/protocol-factory.h"
...@@ -130,7 +130,7 @@ void AdiumStyleRenderer::appendChatMessage(const Message &message, const Message ...@@ -130,7 +130,7 @@ void AdiumStyleRenderer::appendChatMessage(const Message &message, const Message
QString AdiumStyleRenderer::preprocessStyleBaseHtml(bool useTransparency) QString AdiumStyleRenderer::preprocessStyleBaseHtml(bool useTransparency)
{ {
QString styleBaseHtml = m_style->templateHtml(); QString styleBaseHtml = m_style->templateHtml();
styleBaseHtml.replace(styleBaseHtml.indexOf("%@"), 2, Qt::escape(KaduPaths::webKitPath(m_style->baseHref()))); styleBaseHtml.replace(styleBaseHtml.indexOf("%@"), 2, Qt::escape(PathsProvider::webKitPath(m_style->baseHref())));
styleBaseHtml.replace(styleBaseHtml.lastIndexOf("%@"), 2, replaceKeywords(m_style->baseHref(), m_style->footerHtml())); styleBaseHtml.replace(styleBaseHtml.lastIndexOf("%@"), 2, replaceKeywords(m_style->baseHref(), m_style->footerHtml()));
styleBaseHtml.replace(styleBaseHtml.lastIndexOf("%@"), 2, replaceKeywords(m_style->baseHref(), m_style->headerHtml())); styleBaseHtml.replace(styleBaseHtml.lastIndexOf("%@"), 2, replaceKeywords(m_style->baseHref(), m_style->headerHtml()));
...@@ -196,18 +196,18 @@ QString AdiumStyleRenderer::replaceKeywords(const QString &styleHref, const QStr ...@@ -196,18 +196,18 @@ QString AdiumStyleRenderer::replaceKeywords(const QString &styleHref, const QStr
{ {
const Avatar &avatar = configuration().chat().contacts().toContact().avatar(true); const Avatar &avatar = configuration().chat().contacts().toContact().avatar(true);
if (!avatar.isEmpty()) if (!avatar.isEmpty())
photoIncoming = KaduPaths::webKitPath(avatar.smallFilePath()); photoIncoming = PathsProvider::webKitPath(avatar.smallFilePath());
else else
photoIncoming = KaduPaths::webKitPath(styleHref + QLatin1String("Incoming/buddy_icon.png")); photoIncoming = PathsProvider::webKitPath(styleHref + QLatin1String("Incoming/buddy_icon.png"));
} }
else else
photoIncoming = KaduPaths::webKitPath(styleHref + QLatin1String("Incoming/buddy_icon.png")); photoIncoming = PathsProvider::webKitPath(styleHref + QLatin1String("Incoming/buddy_icon.png"));
const Avatar &avatar = configuration().chat().chatAccount().accountContact().avatar(true); const Avatar &avatar = configuration().chat().chatAccount().accountContact().avatar(true);
if (!avatar.isEmpty()) if (!avatar.isEmpty())
photoOutgoing = KaduPaths::webKitPath(avatar.smallFilePath()); photoOutgoing = PathsProvider::webKitPath(avatar.smallFilePath());
else else
photoOutgoing = KaduPaths::webKitPath(styleHref + QLatin1String("Outgoing/buddy_icon.png")); photoOutgoing = PathsProvider::webKitPath(styleHref + QLatin1String("Outgoing/buddy_icon.png"));
result.replace(QString("%incomingIconPath%"), Qt::escape(photoIncoming)); result.replace(QString("%incomingIconPath%"), Qt::escape(photoIncoming));
result.replace(QString("%outgoingIconPath%"), Qt::escape(photoOutgoing)); result.replace(QString("%outgoingIconPath%"), Qt::escape(photoOutgoing));
...@@ -262,18 +262,18 @@ QString AdiumStyleRenderer::replaceKeywords(const QString &styleHref, const QStr ...@@ -262,18 +262,18 @@ QString AdiumStyleRenderer::replaceKeywords(const QString &styleHref, const QStr
const Avatar &avatar = message.messageSender().avatar(true); const Avatar &avatar = message.messageSender().avatar(true);
if (!avatar.isEmpty()) if (!avatar.isEmpty())
photoPath = Qt::escape(KaduPaths::webKitPath(avatar.smallFilePath())); photoPath = Qt::escape(PathsProvider::webKitPath(avatar.smallFilePath()));
else else
photoPath = Qt::escape(KaduPaths::webKitPath(styleHref + QLatin1String("Incoming/buddy_icon.png"))); photoPath = Qt::escape(PathsProvider::webKitPath(styleHref + QLatin1String("Incoming/buddy_icon.png")));
} }
else if (message.type() == MessageTypeSent) else if (message.type() == MessageTypeSent)
{ {
result.replace(QString("%messageClasses%"), "message outgoing"); result.replace(QString("%messageClasses%"), "message outgoing");
const Avatar &avatar = message.messageChat().chatAccount().accountContact().avatar(true); const Avatar &avatar = message.messageChat().chatAccount().accountContact().avatar(true);
if (!avatar.isEmpty()) if (!avatar.isEmpty())
photoPath = Qt::escape(KaduPaths::webKitPath(avatar.smallFilePath())); photoPath = Qt::escape(PathsProvider::webKitPath(avatar.smallFilePath()));
else else
photoPath = Qt::escape(KaduPaths::webKitPath(styleHref + QLatin1String("Outgoing/buddy_icon.png"))); photoPath = Qt::escape(PathsProvider::webKitPath(styleHref + QLatin1String("Outgoing/buddy_icon.png")));
} }
else else
result.remove(QString("%messageClasses%")); result.remove(QString("%messageClasses%"));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "adium-style.h" #include "adium-style.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QTextCodec> #include <QtCore/QTextCodec>
...@@ -100,9 +100,9 @@ AdiumStyle::AdiumStyle(const QString &styleName) : ...@@ -100,9 +100,9 @@ AdiumStyle::AdiumStyle(const QString &styleName) :
Name{styleName}, StyleViewVersion{0}, DefaultBackgroundIsTransparent{false}, UsesCustomTemplateHtml{false} Name{styleName}, StyleViewVersion{0}, DefaultBackgroundIsTransparent{false}, UsesCustomTemplateHtml{false}
{ {
QDir dir; QDir dir;
BaseHref = KaduPaths::instance()->profilePath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/"); BaseHref = PathsProvider::instance()->profilePath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/");
if (!dir.exists(BaseHref)) if (!dir.exists(BaseHref))
BaseHref = KaduPaths::instance()->dataPath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/"); BaseHref = PathsProvider::instance()->dataPath() + QLatin1String("syntax/chat/") + styleName + QLatin1String("/Contents/Resources/");
readConfiugrationFile(); readConfiugrationFile();
loadHtmlFiles(); loadHtmlFiles();
...@@ -138,7 +138,7 @@ void AdiumStyle::loadHtmlFiles() ...@@ -138,7 +138,7 @@ void AdiumStyle::loadHtmlFiles()
TemplateHref = BaseHref + "template.html"; TemplateHref = BaseHref + "template.html";
else else
{ {
TemplateHref = KaduPaths::instance()->dataPath() + QLatin1String("syntax/chat/Default/Template.html"); TemplateHref = PathsProvider::instance()->dataPath() + QLatin1String("syntax/chat/Default/Template.html");
UsesCustomTemplateHtml = false; UsesCustomTemplateHtml = false;
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "configuration/configuration.h" #include "configuration/configuration.h"
#include "configuration/deprecated-configuration-api.h" #include "configuration/deprecated-configuration-api.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "kadu-application.h" #include "kadu-application.h"
#include "main-configuration-holder.h" #include "main-configuration-holder.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "accounts/account.h" #include "accounts/account.h"
#include "avatars/avatar.h" #include "avatars/avatar.h"
#include "icons/kadu-icon.h" #include "icons/kadu-icon.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "parser/parser.h" #include "parser/parser.h"
#include "protocols/protocol.h" #include "protocols/protocol.h"
#include "status/status-container-manager.h" #include "status/status-container-manager.h"
...@@ -37,7 +37,7 @@ static QString getAvatarPath(Talkable talkable) ...@@ -37,7 +37,7 @@ static QString getAvatarPath(Talkable talkable)
if (talkable.avatar().pixmap().isNull()) if (talkable.avatar().pixmap().isNull())
return QString(); return QString();
else else
return KaduPaths::webKitPath(avatar.filePath()); return PathsProvider::webKitPath(avatar.filePath());
} }
static QString getStatusIconPath(Talkable talkable) static QString getStatusIconPath(Talkable talkable)
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
#include "message/unread-message-repository.h" #include "message/unread-message-repository.h"
#include "misc/change-notifier-lock.h" #include "misc/change-notifier-lock.h"
#include "misc/date-time-parser-tags.h" #include "misc/date-time-parser-tags.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "notify/notification-manager.h" #include "notify/notification-manager.h"
#include "parser/parser.h" #include "parser/parser.h"
#include "plugin/dependency-graph/plugin-dependency-graph-builder.h" #include "plugin/dependency-graph/plugin-dependency-graph-builder.h"
...@@ -228,9 +228,9 @@ Core::Core() : ...@@ -228,9 +228,9 @@ Core::Core() :
MainConfigurationHolder::createInstance(); MainConfigurationHolder::createInstance();
Parser::GlobalVariables.insert(QLatin1String("DATA_PATH"), KaduPaths::instance()->dataPath()); Parser::GlobalVariables.insert(QLatin1String("DATA_PATH"), PathsProvider::instance()->dataPath());
Parser::GlobalVariables.insert(QLatin1String("HOME"), KaduPaths::homePath()); Parser::GlobalVariables.insert(QLatin1String("HOME"), PathsProvider::homePath());
Parser::GlobalVariables.insert(QLatin1String("KADU_CONFIG"), KaduPaths::instance()->profilePath()); Parser::GlobalVariables.insert(QLatin1String("KADU_CONFIG"), PathsProvider::instance()->profilePath());
DateTimeParserTags::registerParserTags(); DateTimeParserTags::registerParserTags();
importPre10Configuration(); importPre10Configuration();
...@@ -544,25 +544,25 @@ void Core::deleteOldConfigurationFiles() ...@@ -544,25 +544,25 @@ void Core::deleteOldConfigurationFiles()
{ {
kdebugf(); kdebugf();
QDir oldConfigs(KaduPaths::instance()->profilePath(), "kadu-0.12.conf.xml.backup.*", QDir::Name, QDir::Files); QDir oldConfigs(PathsProvider::instance()->profilePath(), "kadu-0.12.conf.xml.backup.*", QDir::Name, QDir::Files);
if (oldConfigs.count() > 20) if (oldConfigs.count() > 20)
for (unsigned int i = 0, max = oldConfigs.count() - 20; i < max; ++i) for (unsigned int i = 0, max = oldConfigs.count() - 20; i < max; ++i)
QFile::remove(KaduPaths::instance()->profilePath() + oldConfigs[static_cast<int>(i)]); QFile::remove(PathsProvider::instance()->profilePath() + oldConfigs[static_cast<int>(i)]);
QDir oldConfigs2(KaduPaths::instance()->profilePath(), "kadu-0.6.6.conf.xml.backup.*", QDir::Name, QDir::Files); QDir oldConfigs2(PathsProvider::instance()->profilePath(), "kadu-0.6.6.conf.xml.backup.*", QDir::Name, QDir::Files);
if (oldConfigs2.count() > 20) if (oldConfigs2.count() > 20)
for (unsigned int i = 0, max = oldConfigs2.count() - 20; i < max; ++i) for (unsigned int i = 0, max = oldConfigs2.count() - 20; i < max; ++i)
QFile::remove(KaduPaths::instance()->profilePath() + oldConfigs2[static_cast<int>(i)]); QFile::remove(PathsProvider::instance()->profilePath() + oldConfigs2[static_cast<int>(i)]);
QDir oldBacktraces(KaduPaths::instance()->profilePath(), "kadu.backtrace.*", QDir::Name, QDir::Files); QDir oldBacktraces(PathsProvider::instance()->profilePath(), "kadu.backtrace.*", QDir::Name, QDir::Files);
if (oldBacktraces.count() > 20) if (oldBacktraces.count() > 20)
for (unsigned int i = 0, max = oldBacktraces.count() - 20; i < max; ++i) for (unsigned int i = 0, max = oldBacktraces.count() - 20; i < max; ++i)
QFile::remove(KaduPaths::instance()->profilePath() + oldBacktraces[static_cast<int>(i)]); QFile::remove(PathsProvider::instance()->profilePath() + oldBacktraces[static_cast<int>(i)]);
QDir oldDebugs(KaduPaths::instance()->profilePath(), "kadu.log.*", QDir::Name, QDir::Files); QDir oldDebugs(PathsProvider::instance()->profilePath(), "kadu.log.*", QDir::Name, QDir::Files);
if (oldDebugs.count() > 20) if (oldDebugs.count() > 20)
for (unsigned int i = 0, max = oldDebugs.count() - 20; i < max; ++i) for (unsigned int i = 0, max = oldDebugs.count() - 20; i < max; ++i)
QFile::remove(KaduPaths::instance()->profilePath() + oldDebugs[static_cast<int>(i)]); QFile::remove(PathsProvider::instance()->profilePath() + oldDebugs[static_cast<int>(i)]);
kdebugf2(); kdebugf2();
} }
...@@ -733,7 +733,7 @@ void Core::runServices() ...@@ -733,7 +733,7 @@ void Core::runServices()
CurrentPluginDependencyGraphBuilder = new PluginDependencyGraphBuilder(this); CurrentPluginDependencyGraphBuilder = new PluginDependencyGraphBuilder(this);
CurrentPluginMetadataFinder->setDirectory(KaduPaths::instance()->dataPath() + QLatin1String{"plugins"}); CurrentPluginMetadataFinder->setDirectory(PathsProvider::instance()->dataPath() + QLatin1String{"plugins"});
CurrentPluginMetadataFinder->setPluginMetadataReader(CurrentPluginMetadataReader); CurrentPluginMetadataFinder->setPluginMetadataReader(CurrentPluginMetadataReader);
CurrentPluginDependencyHandler = new PluginDependencyHandler(this); CurrentPluginDependencyHandler = new PluginDependencyHandler(this);
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
#include "gui/widgets/configuration/configuration-widget.h" #include "gui/widgets/configuration/configuration-widget.h"
#include "gui/windows/configuration-window.h" #include "gui/windows/configuration-window.h"
#include "icons/kadu-icon.h" #include "icons/kadu-icon.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "kadu-application.h" #include "kadu-application.h"
#include "debug.h" #include "debug.h"
...@@ -215,7 +215,7 @@ QList<ConfigWidget *> ConfigurationWidget::processUiSectionFromDom(QDomNode sect ...@@ -215,7 +215,7 @@ QList<ConfigWidget *> ConfigurationWidget::processUiSectionFromDom(QDomNode sect
QString iconPath = sectionElement.attribute("icon"); QString iconPath = sectionElement.attribute("icon");
// Additional slash is needed so that QUrl would treat the rest as _path_, which is desired here. // Additional slash is needed so that QUrl would treat the rest as _path_, which is desired here.
if (iconPath.startsWith("datapath:///")) if (iconPath.startsWith("datapath:///"))
iconPath = KaduPaths::instance()->dataPath() + iconPath.midRef(static_cast<int>(qstrlen("datapath:///"))); iconPath = PathsProvider::instance()->dataPath() + iconPath.midRef(static_cast<int>(qstrlen("datapath:///")));
configSection(KaduIcon(iconPath), QCoreApplication::translate("@default", sectionName.toUtf8().constData()), true); configSection(KaduIcon(iconPath), QCoreApplication::translate("@default", sectionName.toUtf8().constData()), true);
const QDomNodeList children = sectionElement.childNodes(); const QDomNodeList children = sectionElement.childNodes();
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <QtWidgets/QPushButton> #include <QtWidgets/QPushButton>
#include "gui/windows/message-dialog.h" #include "gui/windows/message-dialog.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "misc/syntax-list.h" #include "misc/syntax-list.h"
#include "syntax-editor.h" #include "syntax-editor.h"
...@@ -86,9 +86,9 @@ void SyntaxEditor::syntaxChangedSlot(const QString &newSyntax) ...@@ -86,9 +86,9 @@ void SyntaxEditor::syntaxChangedSlot(const QString &newSyntax)
SyntaxInfo info = (*syntaxList)[newSyntax]; SyntaxInfo info = (*syntaxList)[newSyntax];
if (info.global) if (info.global)
fileName = KaduPaths::instance()->dataPath() + QLatin1String("syntax/") + category.toLower() + '/' + newSyntax + QLatin1String(".syntax"); fileName = PathsProvider::instance()->dataPath() + QLatin1String("syntax/") + category.toLower() + '/' + newSyntax + QLatin1String(".syntax");
else else
fileName = KaduPaths::instance()->profilePath() + QLatin1String("syntax/") + category.toLower() + '/' + newSyntax + QLatin1String(".syntax"); fileName = PathsProvider::instance()->profilePath() + QLatin1String("syntax/") + category.toLower() + '/' + newSyntax + QLatin1String(".syntax");
file.setFileName(fileName); file.setFileName(fileName);
if (!file.open(QIODevice::ReadOnly)) if (!file.open(QIODevice::ReadOnly))
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "gui/widgets/webkit-messages-view/webkit-messages-view-display.h" #include "gui/widgets/webkit-messages-view/webkit-messages-view-display.h"
#include "gui/widgets/webkit-messages-view/webkit-messages-view-display-factory.h" #include "gui/widgets/webkit-messages-view/webkit-messages-view-display-factory.h"
#include "gui/widgets/webkit-messages-view/webkit-messages-view-handler.h" #include "gui/widgets/webkit-messages-view/webkit-messages-view-handler.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
WebkitMessagesViewHandlerFactory::WebkitMessagesViewHandlerFactory(QObject *parent) : WebkitMessagesViewHandlerFactory::WebkitMessagesViewHandlerFactory(QObject *parent) :
QObject{parent} QObject{parent}
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "gui/widgets/webkit-messages-view/message-limit-policy.h" #include "gui/widgets/webkit-messages-view/message-limit-policy.h"
#include "gui/widgets/webkit-messages-view/webkit-messages-view-handler.h" #include "gui/widgets/webkit-messages-view/webkit-messages-view-handler.h"
#include "gui/widgets/webkit-messages-view/webkit-messages-view-handler-factory.h" #include "gui/widgets/webkit-messages-view/webkit-messages-view-handler-factory.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "protocols/protocol.h" #include "protocols/protocol.h"
#include "protocols/services/chat-image-service.h" #include "protocols/services/chat-image-service.h"
#include "protocols/services/chat-service.h" #include "protocols/services/chat-service.h"
...@@ -210,7 +210,7 @@ void WebkitMessagesView::refreshView() ...@@ -210,7 +210,7 @@ void WebkitMessagesView::refreshView()
ChatStyleRendererConfiguration WebkitMessagesView::rendererConfiguration() ChatStyleRendererConfiguration WebkitMessagesView::rendererConfiguration()
{ {
QFile file{KaduPaths::instance()->dataPath() + QLatin1String("scripts/chat-scripts.js")}; QFile file{PathsProvider::instance()->dataPath() + QLatin1String("scripts/chat-scripts.js")};
auto javaScript = file.open(QIODevice::ReadOnly | QIODevice::Text) auto javaScript = file.open(QIODevice::ReadOnly | QIODevice::Text)
? file.readAll() ? file.readAll()
: QString{}; : QString{};
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#include "core/core.h" #include "core/core.h"
#include "dom/dom-processor-service.h" #include "dom/dom-processor-service.h"
#include "icons/kadu-icon.h" #include "icons/kadu-icon.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "os/generic/url-opener.h" #include "os/generic/url-opener.h"
#include "os/generic/window-geometry-manager.h" #include "os/generic/window-geometry-manager.h"
#include "url-handlers/url-handler-manager.h" #include "url-handlers/url-handler-manager.h"
...@@ -232,7 +232,7 @@ QString About::loadFile(const QString &name) ...@@ -232,7 +232,7 @@ QString About::loadFile(const QString &name)
{ {
kdebugf(); kdebugf();
QFile file(KaduPaths::instance()->dataPath() + name); QFile file(PathsProvider::instance()->dataPath() + name);
if (!file.open(QIODevice::ReadOnly)) if (!file.open(QIODevice::ReadOnly))
{ {
kdebugm(KDEBUG_ERROR, "About::loadFile(%s) cannot open file\n", qPrintable(name)); kdebugm(KDEBUG_ERROR, "About::loadFile(%s) cannot open file\n", qPrintable(name));
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#include "gui/widgets/tool-tip-class-manager.h" #include "gui/widgets/tool-tip-class-manager.h"
#include "gui/windows/kadu-window.h" #include "gui/windows/kadu-window.h"
#include "gui/windows/message-dialog.h" #include "gui/windows/message-dialog.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "network/proxy/network-proxy.h" #include "network/proxy/network-proxy.h"
#include "plugin/gui/plugin-list/plugin-list-widget.h" #include "plugin/gui/plugin-list/plugin-list-widget.h"
#include "status/status-container.h" #include "status/status-container.h"
...@@ -174,7 +174,7 @@ MainConfigurationWindow::MainConfigurationWindow() : ...@@ -174,7 +174,7 @@ MainConfigurationWindow::MainConfigurationWindow() :
{ {
setWindowRole("kadu-configuration"); setWindowRole("kadu-configuration");
widget()->appendUiFile(KaduPaths::instance()->dataPath() + QLatin1String("configuration/dialog.ui")); widget()->appendUiFile(PathsProvider::instance()->dataPath() + QLatin1String("configuration/dialog.ui"));
#ifndef DEBUG_ENABLED #ifndef DEBUG_ENABLED
widget()->widgetById("debug")->hide(); widget()->widgetById("debug")->hide();
...@@ -310,7 +310,7 @@ void MainConfigurationWindow::installIconTheme() ...@@ -310,7 +310,7 @@ void MainConfigurationWindow::installIconTheme()
if (fileName.isEmpty()) if (fileName.isEmpty())
return; return;
const QString &profilePath = KaduPaths::instance()->profilePath(); const QString &profilePath = PathsProvider::instance()->profilePath();
ArchiveExtractor extractor; ArchiveExtractor extractor;
bool success = extractor.extract(fileName, profilePath + "icons"); bool success = extractor.extract(fileName, profilePath + "icons");
if (success) if (success)
...@@ -395,7 +395,7 @@ void MainConfigurationWindow::showLookChatAdvanced() ...@@ -395,7 +395,7 @@ void MainConfigurationWindow::showLookChatAdvanced()
if (!lookChatAdvanced) if (!lookChatAdvanced)
{ {
lookChatAdvanced = new ConfigurationWindow("LookChatAdvanced", tr("Advanced chat's look configuration"), "General", instanceDataManager()); lookChatAdvanced = new ConfigurationWindow("LookChatAdvanced", tr("Advanced chat's look configuration"), "General", instanceDataManager());
lookChatAdvanced.data()->widget()->appendUiFile(KaduPaths::instance()->dataPath() + QLatin1String("configuration/dialog-look-chat-advanced.ui")); lookChatAdvanced.data()->widget()->appendUiFile(PathsProvider::instance()->dataPath() + QLatin1String("configuration/dialog-look-chat-advanced.ui"));
lookChatAdvanced.data()->widget()->widgetById("chatSyntax")->setToolTip(QCoreApplication::translate("@default", SyntaxText)); lookChatAdvanced.data()->widget()->widgetById("chatSyntax")->setToolTip(QCoreApplication::translate("@default", SyntaxText));
lookChatAdvanced.data()->widget()->widgetById("conferencePrefix")->setToolTip(QCoreApplication::translate("@default", SyntaxText)); lookChatAdvanced.data()->widget()->widgetById("conferencePrefix")->setToolTip(QCoreApplication::translate("@default", SyntaxText));
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
#include "gui/widgets/chat-widget/chat-widget-manager.h" #include "gui/widgets/chat-widget/chat-widget-manager.h"
#include "gui/widgets/filtered-tree-view.h" #include "gui/widgets/filtered-tree-view.h"
#include "gui/widgets/line-edit-with-clear-button.h" #include "gui/widgets/line-edit-with-clear-button.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "model/model-chain.h" #include "model/model-chain.h"
#include "model/roles.h" #include "model/roles.h"
#include "talkable/model/talkable-proxy-model.h" #include "talkable/model/talkable-proxy-model.h"
...@@ -110,7 +110,7 @@ OpenChatWith::OpenChatWith() : ...@@ -110,7 +110,7 @@ OpenChatWith::OpenChatWith() :
BuddiesView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); BuddiesView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
BuddiesView->setResizeMode(QDeclarativeView::SizeRootObjectToView); BuddiesView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
BuddiesView->setSource(QUrl(KaduPaths::instance()->dataPath() + "qml/openChatWith.qml")); BuddiesView->setSource(QUrl(PathsProvider::instance()->dataPath() + "qml/openChatWith.qml"));
connect(BuddiesView->rootObject(), SIGNAL(itemActivated(int)), this, SLOT(itemActivated(int))); connect(BuddiesView->rootObject(), SIGNAL(itemActivated(int)), this, SLOT(itemActivated(int)));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <QtGui/QIcon> #include <QtGui/QIcon>
#include "icons/icons-manager.h" #include "icons/icons-manager.h"
#include "misc/kadu-paths.h" #include "misc/paths-provider.h"
#include "kadu-icon.h" #include "kadu-icon.h"
...@@ -32,7 +32,7 @@ QString KaduIcon::fullPath() const ...@@ -32,7 +32,7 @@ QString KaduIcon::fullPath() const
QString KaduIcon::webKitPath() const QString KaduIcon::webKitPath() const
{ {
return KaduPaths::webKitPath(fullPath()); return PathsProvider::webKitPath(fullPath());
} }
QIcon KaduIcon::icon() const QIcon KaduIcon::icon() const
......
...@@ -153,7 +153,7 @@ public: ...@@ -153,7 +153,7 @@ public:
* @return WebKit-friendly representation of path * @return WebKit-friendly representation of path
* *
* Return WebKit-friendly representation of full path to the icon file. Makes use * Return WebKit-friendly representation of full path to the icon file. Makes use
* of KaduPaths::webKitPath() method.