Commit 4bc90a5d authored by Jeremy Whiting's avatar Jeremy Whiting

Port away from KStandardDirs.

parent db019ac0
......@@ -53,6 +53,8 @@
#include <iostream>
#include <khelpclient.h>
#include <kglobal.h>
#include <QStandardPaths>
#include <KSharedConfig>
int currentXPosition;
int currentYPosition;
......@@ -88,12 +90,12 @@ void KMouseTool::init_vars()
loadOptions();
// If the ~/.mousetool directory doesn't exist, create it
mSoundFileName = KStandardDirs::locate("appdata", QLatin1String( "sounds/mousetool_tap.wav" ));
mSoundFileName = QStandardPaths::locate(QStandardPaths::DataLocation, QLatin1String( "sounds/mousetool_tap.wav" ));
mplayer = Phonon::createPlayer(Phonon::AccessibilityCategory);
mplayer->setParent(this);
// find application file
appfilename = KStandardDirs::locate("exe", QLatin1String( "kmousetool" ));
appfilename = KStandardDirs::findExe(QLatin1String( "kmousetool" ));
// find the user's autostart directory
#pragma warning FIXME port to KF5
......
......@@ -20,11 +20,12 @@
#include <kcmdlineargs.h>
#include <k4aboutdata.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kuniqueapplication.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <KSharedConfig>
#include "kmousetool.h"
......
......@@ -22,10 +22,11 @@
#include <iostream>
// these are for locating the stroke information file
#include <kstandarddirs.h>
// #include <string>
#include <QStandardPaths>
using namespace std;
......@@ -187,7 +188,7 @@ void MTStroke::getExtent()
bool MTStroke::readSequence()
{
QString strokefilename;
strokefilename = KStandardDirs::locate("config", QLatin1String( "kmousetool_strokes.txt" ) );
strokefilename = QStandardPaths::locate(QStandardPaths::ConfigLocation, QLatin1String( "kmousetool_strokes.txt" ) );
if (strokefilename.isEmpty()) {
// make default
if (sequenceMap.size()==0)
......@@ -223,7 +224,7 @@ bool MTStroke::readSequence()
bool MTStroke::writeSequence()
{
QString strokefilename;
strokefilename = KStandardDirs::locateLocal("config", QLatin1String( "kmousetool_strokes.txt" ));
strokefilename = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QLatin1String("/kmousetool_strokes.txt" );
ofstream outfile (strokefilename.toAscii(), ios::out);
if (!outfile) {
......
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