summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-03-25 21:25:48 +0100
committerPali Roh├ír <[email protected]>2017-12-22 09:10:25 +0100
commitcf7f90b4b8f3cab8b32a8cfff041521041f3033f (patch)
treef3166df9d844234f796588adfe3206ed44a22516
parent302739f4cc415f9622390c44836bab44c8655183 (diff)
Remove kstandarddirs
-rw-r--r--protocols/groupwise/ui/gweditaccountwidget.cpp1
-rw-r--r--protocols/irc/ircnetwork.cpp7
-rw-r--r--protocols/irc/ircprotocol.cpp2
-rw-r--r--protocols/irc/ui/irceditaccountwidget.cpp3
-rw-r--r--protocols/irc/ui/networkconfigwidget.cpp2
-rw-r--r--protocols/jabber/jabberaccount.cpp1
-rw-r--r--protocols/jabber/jabberbasecontact.cpp2
-rw-r--r--protocols/jabber/jabbercapabilitiesmanager.cpp7
-rw-r--r--protocols/jabber/jabbercontact.cpp9
-rw-r--r--protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_bytestream.cpp2
-rw-r--r--protocols/jabber/ui/dlgjabbervcard.cpp2
-rw-r--r--protocols/jabber/ui/jabbereditaccountwidget.cpp1
-rw-r--r--protocols/oscar/aim/aimuserinfo.cpp2
-rw-r--r--protocols/oscar/oscaraccount.cpp5
-rw-r--r--protocols/oscar/oscarcontact.cpp2
-rw-r--r--protocols/oscar/oscarprotocol.cpp1
-rw-r--r--protocols/qq/qqcontact.cpp8
-rw-r--r--protocols/qq/ui/dlgqqvcard.cpp3
-rw-r--r--protocols/qq/ui/qqeditaccountwidget.cpp2
-rw-r--r--protocols/winpopup/wpprotocol.cpp1
-rw-r--r--protocols/winpopup/wpuserinfo.cpp1
-rw-r--r--protocols/wlm/wlmaccount.cpp2
-rw-r--r--protocols/wlm/wlmchatsession.cpp5
-rw-r--r--protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp2
-rw-r--r--protocols/yahoo/yahooaccount.cpp9
-rw-r--r--protocols/yahoo/yahoocontact.cpp2
-rw-r--r--protocols/yahoo/yahooeditaccount.cpp2
-rw-r--r--protocols/yahoo/yahooverifyaccount.cpp2
28 files changed, 52 insertions, 36 deletions
diff --git a/protocols/groupwise/ui/gweditaccountwidget.cpp b/protocols/groupwise/ui/gweditaccountwidget.cpp
index 3c39628..08e28c7 100644
--- a/protocols/groupwise/ui/gweditaccountwidget.cpp
+++ b/protocols/groupwise/ui/gweditaccountwidget.cpp
@@ -33,6 +33,7 @@
#include <kmessagebox.h>
#include <kpassworddialog.h>
#include <kglobal.h>
+#include <KSharedConfig>
#include "kopetepasswordedaccount.h"
#include "kopetepasswordwidget.h"
diff --git a/protocols/irc/ircnetwork.cpp b/protocols/irc/ircnetwork.cpp
index 3f1ac75..1605bf9 100644
--- a/protocols/irc/ircnetwork.cpp
+++ b/protocols/irc/ircnetwork.cpp
@@ -20,10 +20,11 @@
#include "ircnetwork.h"
#include <kdebug.h>
-#include <kstandarddirs.h> // for locate
+ // for locate
#include <qdom.h>
#include <qfile.h>
+#include <QStandardPaths>
struct IRC::Networks::Private {
IRC::NetworkList networks;
@@ -72,7 +73,7 @@ void Networks::slotReadNetworks()
{
d->networks.clear();
- QFile xmlFile(KStandardDirs::locate("appdata", "ircnetworks.xml"));
+ QFile xmlFile(QStandardPaths::locate(QStandardPaths::DataLocation, "ircnetworks.xml"));
xmlFile.open(QIODevice::ReadOnly);
// FIXME
@@ -160,7 +161,7 @@ bool Networks::slotSaveNetworkConfig() const
}
// kDebug(14121) << doc.toString(4);
- QFile xmlFile(KStandardDirs::locateLocal("appdata", "ircnetworks.xml"));
+ QFile xmlFile(QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "ircnetworks.xml");
if (xmlFile.open(QIODevice::WriteOnly)) {
QTextStream stream(&xmlFile);
diff --git a/protocols/irc/ircprotocol.cpp b/protocols/irc/ircprotocol.cpp
index 6a6bc5e..037c047 100644
--- a/protocols/irc/ircprotocol.cpp
+++ b/protocols/irc/ircprotocol.cpp
@@ -49,7 +49,7 @@
#include <kinputdialog.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <kstandarddirs.h>
+
#include <kuser.h>
#include <qcheckbox.h>
diff --git a/protocols/irc/ui/irceditaccountwidget.cpp b/protocols/irc/ui/irceditaccountwidget.cpp
index de160f2..58f10e6 100644
--- a/protocols/irc/ui/irceditaccountwidget.cpp
+++ b/protocols/irc/ui/irceditaccountwidget.cpp
@@ -40,6 +40,7 @@
#include <algorithm>
#include <kconfiggroup.h>
+#include <KSharedConfig>
IRCEditAccountWidget::IRCEditAccountWidget(IRCAccount *ident, QWidget *parent)
: QWidget(parent)
@@ -211,7 +212,7 @@ void IRCEditAccountWidget::slotAddCtcp()
QString IRCEditAccountWidget::generateAccountId(const QString &network)
{
- KSharedConfig::Ptr config = KGlobal::config();
+ KSharedConfig::Ptr config = KSharedConfig::openConfig();
QString nextId = network;
uint accountNumber = 1;
diff --git a/protocols/irc/ui/networkconfigwidget.cpp b/protocols/irc/ui/networkconfigwidget.cpp
index a67dfd0..77f60c8 100644
--- a/protocols/irc/ui/networkconfigwidget.cpp
+++ b/protocols/irc/ui/networkconfigwidget.cpp
@@ -41,7 +41,7 @@
#include <kiconloader.h>
#include <kmessagebox.h>
#include <ksimpleconfig.h>
-#include <kstandarddirs.h>
+
#include <kuser.h>
#include <qcheckbox.h>
diff --git a/protocols/jabber/jabberaccount.cpp b/protocols/jabber/jabberaccount.cpp
index 7c54599..c0a6329 100644
--- a/protocols/jabber/jabberaccount.cpp
+++ b/protocols/jabber/jabberaccount.cpp
@@ -77,6 +77,7 @@
#include "jt_pubsub.h"
#include <sys/utsname.h>
+#include <KSharedConfig>
#ifdef LIBJINGLE_SUPPORT
#include "libjingle.h"
diff --git a/protocols/jabber/jabberbasecontact.cpp b/protocols/jabber/jabberbasecontact.cpp
index add3fa3..1b4ad62 100644
--- a/protocols/jabber/jabberbasecontact.cpp
+++ b/protocols/jabber/jabberbasecontact.cpp
@@ -21,7 +21,7 @@
#include "jabber_protocol_debug.h"
#include <KLocalizedString>
#include <kiconloader.h>
-#include <kstandarddirs.h>
+
#include <qtimer.h>
#include <qimage.h>
#include <qregexp.h>
diff --git a/protocols/jabber/jabbercapabilitiesmanager.cpp b/protocols/jabber/jabbercapabilitiesmanager.cpp
index 3daf550..18ba528 100644
--- a/protocols/jabber/jabbercapabilitiesmanager.cpp
+++ b/protocols/jabber/jabbercapabilitiesmanager.cpp
@@ -29,10 +29,11 @@
#include <qfile.h>
#include <qtextcodec.h>
-#include <kstandarddirs.h>
+
#include "jabber_protocol_debug.h"
#include <xmpp_tasks.h>
+#include <QStandardPaths>
#include "jabberaccount.h"
#include "jabberprotocol.h"
@@ -487,7 +488,7 @@ void JabberCapabilitiesManager::discoRequestFinished()
void JabberCapabilitiesManager::loadCachedInformation()
{
QString capsFileName;
- capsFileName = KStandardDirs::locateLocal("appdata", QStringLiteral("jabber-capabilities-cache.xml"));
+ capsFileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + QStringLiteral("jabber-capabilities-cache.xml");
// Load settings
QDomDocument doc;
@@ -594,7 +595,7 @@ QString JabberCapabilitiesManager::clientVersion(const Jid &jid) const
void JabberCapabilitiesManager::saveInformation()
{
QString capsFileName;
- capsFileName = KStandardDirs::locateLocal("appdata", QStringLiteral("jabber-capabilities-cache.xml"));
+ capsFileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + QStringLiteral("jabber-capabilities-cache.xml");
// Generate XML
QDomDocument doc;
diff --git a/protocols/jabber/jabbercontact.cpp b/protocols/jabber/jabbercontact.cpp
index 1fbc996..74cf69f 100644
--- a/protocols/jabber/jabbercontact.cpp
+++ b/protocols/jabber/jabbercontact.cpp
@@ -39,10 +39,11 @@
#include <QAction>
#include <kactionmenu.h>
#include <kicon.h>
-#include <kstandarddirs.h>
+
#include <kio/netaccess.h>
#include <qinputdialog.h>
#include <kopeteview.h>
+#include <QStandardPaths>
#include "kopetecontactlist.h"
#include "kopetegroup.h"
@@ -814,7 +815,7 @@ void JabberContact::setPhoto( const QString &photoPath )
if(contactPhoto.width() > 96 || contactPhoto.height() > 96)
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( KStandardDirs::locateLocal( "appdata", "jabberphotos/"+ QUrl(photoPath).fileName().toLower() ) );
+ QString newLocation( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "jabberphotos/"+ QUrl(photoPath).fileName().toLower() ) ;
// Scale and crop the picture.
contactPhoto = contactPhoto.scaled( 96, 96, Qt::KeepAspectRatio, Qt::SmoothTransformation );
@@ -833,7 +834,7 @@ void JabberContact::setPhoto( const QString &photoPath )
else if (contactPhoto.width() < 32 || contactPhoto.height() < 32)
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( KStandardDirs::locateLocal( "appdata", "jabberphotos/"+ QUrl(photoPath).fileName().toLower() ) );
+ QString newLocation( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "jabberphotos/"+ QUrl(photoPath).fileName().toLower() ) ;
// Scale and crop the picture.
contactPhoto = contactPhoto.scaled( 32, 32, Qt::KeepAspectRatio, Qt::SmoothTransformation );
@@ -852,7 +853,7 @@ void JabberContact::setPhoto( const QString &photoPath )
else if (contactPhoto.width() != contactPhoto.height())
{
// Save image to a new location if the image isn't the correct format.
- QString newLocation( KStandardDirs::locateLocal( "appdata", "jabberphotos/"+ QUrl(photoPath).fileName().toLower() ) );
+ QString newLocation( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "jabberphotos/"+ QUrl(photoPath).fileName().toLower() ) ;
if(contactPhoto.width() < contactPhoto.height())
contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, contactPhoto.height(), contactPhoto.height());
diff --git a/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_bytestream.cpp b/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_bytestream.cpp
index 6a1faef..00baefd 100644
--- a/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_bytestream.cpp
+++ b/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_bytestream.cpp
@@ -61,4 +61,4 @@ void BytestreamManager::deleteConnection(BSConnection *c, int msec)
}
}
-} \ No newline at end of file
+}
diff --git a/protocols/jabber/ui/dlgjabbervcard.cpp b/protocols/jabber/ui/dlgjabbervcard.cpp
index 1c7d724..a6861f1 100644
--- a/protocols/jabber/ui/dlgjabbervcard.cpp
+++ b/protocols/jabber/ui/dlgjabbervcard.cpp
@@ -37,7 +37,7 @@
#include <krun.h>
#include <kio/netaccess.h>
#include <kfiledialog.h>
-#include <kstandarddirs.h>
+
// libiris(XMPP backend) includes
#include "im.h"
diff --git a/protocols/jabber/ui/jabbereditaccountwidget.cpp b/protocols/jabber/ui/jabbereditaccountwidget.cpp
index 004fcfa..b6c7844 100644
--- a/protocols/jabber/ui/jabbereditaccountwidget.cpp
+++ b/protocols/jabber/ui/jabbereditaccountwidget.cpp
@@ -35,6 +35,7 @@
//#include <solid/devicenotifier.h>
//#include <solid/device.h>
+#include <KSharedConfig>
#include "kopetecontact.h"
diff --git a/protocols/oscar/aim/aimuserinfo.cpp b/protocols/oscar/aim/aimuserinfo.cpp
index 9d239ff..7a10672 100644
--- a/protocols/oscar/aim/aimuserinfo.cpp
+++ b/protocols/oscar/aim/aimuserinfo.cpp
@@ -29,7 +29,7 @@
#include <qtimer.h>
#include <KLocalizedString>
-#include <kstandarddirs.h>
+
#include <qtextbrowser.h>
#include <kdebug.h>
diff --git a/protocols/oscar/oscaraccount.cpp b/protocols/oscar/oscaraccount.cpp
index f712073..05a7aae 100644
--- a/protocols/oscar/oscaraccount.cpp
+++ b/protocols/oscar/oscaraccount.cpp
@@ -51,7 +51,7 @@
#include <kmessagebox.h>
#include <kdialog.h>
#include <knotification.h>
-#include <kstandarddirs.h>
+
#include <kprotocolmanager.h>
#include "client.h"
@@ -72,6 +72,7 @@
#include "oscarprotocol.h"
#include "oscarstatusmanager.h"
#include <kopetesockettimeoutwatcher.h>
+#include <QStandardPaths>
using namespace Oscar;
@@ -787,7 +788,7 @@ void OscarAccount::updateBuddyIcon( const QString &path )
if( image.height() > size.height())
image = image.copy( 0, ( image.height() - size.height() ) / 2, image.width(), size.height() );
- QString newlocation( KStandardDirs::locateLocal( "appdata", "oscarpictures/" + accountId() + ".jpg" ) );
+ QString newlocation( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "oscarpictures/" + accountId() + ".jpg" ) ;
kDebug(OSCAR_RAW_DEBUG) << "Saving buddy icon: " << newlocation;
if ( !image.save( newlocation, "JPEG" ) )
diff --git a/protocols/oscar/oscarcontact.cpp b/protocols/oscar/oscarcontact.cpp
index 6182713..03128de 100644
--- a/protocols/oscar/oscarcontact.cpp
+++ b/protocols/oscar/oscarcontact.cpp
@@ -34,7 +34,7 @@
#include <krandom.h>
#include <kcodecs.h>
#include <kmessagebox.h>
-#include <kstandarddirs.h>
+
#include <qinputdialog.h>
#include <kfiledialog.h>
diff --git a/protocols/oscar/oscarprotocol.cpp b/protocols/oscar/oscarprotocol.cpp
index 91dc2f2..863f14e 100644
--- a/protocols/oscar/oscarprotocol.cpp
+++ b/protocols/oscar/oscarprotocol.cpp
@@ -21,6 +21,7 @@
#include <KLocalizedString>
#include <kglobal.h>
#include <kconfiggroup.h>
+#include <KSharedConfig>
#include "kopeteaccountmanager.h"
diff --git a/protocols/qq/qqcontact.cpp b/protocols/qq/qqcontact.cpp
index c69507c..b8cde20 100644
--- a/protocols/qq/qqcontact.cpp
+++ b/protocols/qq/qqcontact.cpp
@@ -30,7 +30,7 @@
#include <kfiledialog.h>
#include <QLineEdit>
#include <klocale.h>
-#include <kstandarddirs.h>
+
#include <kmessagebox.h>
#include <ktoolinvocation.h>
#include <ktemporaryfile.h>
@@ -40,6 +40,8 @@
#include <kio/job.h>
#include <kdialog.h>
#include <QIcon>
+#include <QStandardPaths>
+#include <KSharedConfig>
#include "kopetecontactlist.h"
#include "kopetechatsessionmanager.h"
@@ -439,7 +441,7 @@ void QQContact::setDisplayPicture(KTemporaryFile *f)
//copy the temp file somewere else.
// in a better world, the file could be dirrectly wrote at the correct location.
// but the custom emoticon code is to deeply merged in the display picture code while it could be separated.
- QString newlocation=KStandardDirs::locateLocal( "appdata", "qqpictures/"+ contactId().toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) ;
+ QString newlocation=QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "qqpictures/"+ contactId().toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ;
QString fileName = f->fileName();
f->setAutoRemove(false);
@@ -453,7 +455,7 @@ void QQContact::setDisplayPicture(KTemporaryFile *f)
void QQContact::slotEmitDisplayPictureChanged()
{
- QString newlocation=KStandardDirs::locateLocal( "appdata", "qqpictures/"+ contactId().toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) ;
+ QString newlocation=QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "qqpictures/"+ contactId().toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ;
setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
emit displayPictureChanged();
}
diff --git a/protocols/qq/ui/dlgqqvcard.cpp b/protocols/qq/ui/dlgqqvcard.cpp
index 87a3d34..ab9dc6b 100644
--- a/protocols/qq/ui/dlgqqvcard.cpp
+++ b/protocols/qq/ui/dlgqqvcard.cpp
@@ -26,6 +26,7 @@
#include <QPixmap>
// KDE includes
#include <kdebug.h>
+#include <QStandardPaths>
// Kopete includes
#include "qqprotocol.h"
#include "qqcontact.h"
@@ -332,7 +333,7 @@ void dlgQQVCard::slotSelectPhoto()
img = img.copy(0, (img.height()-img.width())/2, img.height(), img.height());
}
- m_photoPath = KStandardDirs::locateLocal("appdata", "qqphotos/" + m_contact->rosterItem().jid().full().toLower().replace(QRegExp("[./~]"),"-") +".png");
+ m_photoPath = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "qqphotos/" + m_contact->rosterItem().jid().full().toLower().replace(QRegExp("[./~]"),"-") +".png";
if( img.save(m_photoPath, "PNG") )
{
m_mainWidget->lblPhoto->setPixmap( QPixmap::fromImage(img) );
diff --git a/protocols/qq/ui/qqeditaccountwidget.cpp b/protocols/qq/ui/qqeditaccountwidget.cpp
index 682128c..b600fd4 100644
--- a/protocols/qq/ui/qqeditaccountwidget.cpp
+++ b/protocols/qq/ui/qqeditaccountwidget.cpp
@@ -33,7 +33,7 @@
#include <kfiledialog.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <kstandarddirs.h>
+
#include <kio/netaccess.h>
#include <kdebug.h>
#include <ktoolinvocation.h>
diff --git a/protocols/winpopup/wpprotocol.cpp b/protocols/winpopup/wpprotocol.cpp
index 49908af..49c8506 100644
--- a/protocols/winpopup/wpprotocol.cpp
+++ b/protocols/winpopup/wpprotocol.cpp
@@ -32,6 +32,7 @@
#include <kconfig.h>
#include <kstandarddirs.h>
#include <ktoolinvocation.h>
+#include <KSharedConfig>
// Kopete Includes
#include "kopeteaccountmanager.h"
diff --git a/protocols/winpopup/wpuserinfo.cpp b/protocols/winpopup/wpuserinfo.cpp
index 2100801..55cfe8c 100644
--- a/protocols/winpopup/wpuserinfo.cpp
+++ b/protocols/winpopup/wpuserinfo.cpp
@@ -29,6 +29,7 @@
#include <KGlobal>
#include <KLocale>
#include <KConfig>
+#include <KSharedConfig>
// Local Includes
#include "wpaccount.h"
diff --git a/protocols/wlm/wlmaccount.cpp b/protocols/wlm/wlmaccount.cpp
index 3bf72fb..6102015 100644
--- a/protocols/wlm/wlmaccount.cpp
+++ b/protocols/wlm/wlmaccount.cpp
@@ -32,7 +32,7 @@
#include <knotification.h>
#include <KCodecs>
#include <KInputDialog>
-#include <KStandardDirs>
+
#include <KToolInvocation>
#include "kopetechatsessionmanager.h"
diff --git a/protocols/wlm/wlmchatsession.cpp b/protocols/wlm/wlmchatsession.cpp
index b2f167b..fa4bb01 100644
--- a/protocols/wlm/wlmchatsession.cpp
+++ b/protocols/wlm/wlmchatsession.cpp
@@ -41,7 +41,7 @@
#include <kmainwindow.h>
#include <ktoolbar.h>
#include <krun.h>
-#include <kstandarddirs.h>
+
#include <kcomponentdata.h>
#include <kemoticons.h>
#include <kcodecs.h>
@@ -65,6 +65,7 @@
#include "wlmchatsessioninkaction.h"
#ifdef HAVE_GIFLIB
#include <gif_lib.h>
+#include <QStandardPaths>
/* old giflib has no GIFLIB_MAJOR, define to avoid cpp warnings */
#ifndef GIFLIB_MAJOR
#define GIFLIB_MAJOR 4
@@ -1173,7 +1174,7 @@ WlmChatSession::requestDisplayPicture ()
}
if (isReady ())
{
- QString newlocation = KGlobal::dirs()->locateLocal("appdata", "wlmpictures/" + QString(SHA1D.replace ('/', '_')));
+ QString newlocation = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "wlmpictures/" + QString(SHA1D.replace ('/', '_'));
getChatService()->requestDisplayPicture(generateSessionID(), QFile::encodeName(newlocation).constData(),
contact->getMsnObj().toUtf8().constData());
setDownloadDisplayPicture (false);
diff --git a/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp b/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp
index 6cfc351..03a36f7 100644
--- a/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp
+++ b/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp
@@ -25,7 +25,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kurl.h>
-#include <kstandarddirs.h>
+
#include <klocale.h>
#include "yahootypes.h"
diff --git a/protocols/yahoo/yahooaccount.cpp b/protocols/yahoo/yahooaccount.cpp
index bca865a..1895e8c 100644
--- a/protocols/yahoo/yahooaccount.cpp
+++ b/protocols/yahoo/yahooaccount.cpp
@@ -44,7 +44,7 @@
#include <QMenu>
#include <kmessagebox.h>
#include <krun.h>
-#include <kstandarddirs.h>
+
#include <ktoolinvocation.h>
#include <QIcon>
#include <kmessagebox_queued.h>
@@ -60,6 +60,7 @@
#include <kopetetransfermanager.h>
#include <kopeteview.h>
#include <kopeteaddedinfoevent.h>
+#include <QStandardPaths>
// Yahoo
#include "yahoocontact.h"
@@ -1673,7 +1674,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum)
}
if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() &&
- QFile::exists( KStandardDirs::locateLocal( "appdata", "yahoopictures/"+ who.toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) ) )
+ QFile::exists( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "yahoopictures/"+ who.toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) )
{
qCDebug(YAHOO_PROTOCOL_LOG) << "Icon already exists. I will not request it again.";
return;
@@ -1691,7 +1692,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KUrl url, int checks
}
if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() &&
- QFile::exists( KStandardDirs::locateLocal( "appdata", "yahoopictures/"+ who.toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) ))
+ QFile::exists( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "yahoopictures/"+ who.toLower().replace(QRegExp("[./~]"),QStringLiteral("-")) +".png" ) )
{
qCDebug(YAHOO_PROTOCOL_LOG) << "Icon already exists. I will not download it again.";
return;
@@ -1732,7 +1733,7 @@ void YahooAccount::setBuddyIcon( const KUrl &url )
else
{
QImage image( url.toLocalFile() );
- QString newlocation( KStandardDirs::locateLocal( "appdata", "yahoopictures/"+ url.fileName().toLower() ) ) ;
+ QString newlocation( QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + "yahoopictures/"+ url.fileName().toLower() ) ;
QFile iconFile( newlocation );
QByteArray data;
uint expire = myself()->property( YahooProtocol::protocol()->iconExpire ).value().toInt();
diff --git a/protocols/yahoo/yahoocontact.cpp b/protocols/yahoo/yahoocontact.cpp
index c8b885d..60b6230 100644
--- a/protocols/yahoo/yahoocontact.cpp
+++ b/protocols/yahoo/yahoocontact.cpp
@@ -61,7 +61,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kimageio.h>
-#include <kstandarddirs.h>
+
#include <kfiledialog.h>
#include <ktoolinvocation.h>
#include <QIcon>
diff --git a/protocols/yahoo/yahooeditaccount.cpp b/protocols/yahoo/yahooeditaccount.cpp
index 04e64b2..952a92d 100644
--- a/protocols/yahoo/yahooeditaccount.cpp
+++ b/protocols/yahoo/yahooeditaccount.cpp
@@ -39,7 +39,7 @@
#include <kfiledialog.h>
#include <kpassworddialog.h>
#include <kconfig.h>
-#include <kstandarddirs.h>
+
#include <ktoolinvocation.h>
#include <kmessagebox_queued.h>
diff --git a/protocols/yahoo/yahooverifyaccount.cpp b/protocols/yahoo/yahooverifyaccount.cpp
index dfd18d4..5f54db6 100644
--- a/protocols/yahoo/yahooverifyaccount.cpp
+++ b/protocols/yahoo/yahooverifyaccount.cpp
@@ -29,7 +29,7 @@
#include <kio/global.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <kstandarddirs.h>
+
// Kopete Includes
#include <kopeteaccount.h>