Commit 1a5f5a78 authored by Michal Humpula's avatar Michal Humpula

more KGlobal cleaning

parent 630807d4
......@@ -1293,7 +1293,9 @@ void KateHlDownloadDialog::listDataReceived(KIO::Job *, const QByteArray &data)
void KateHlDownloadDialog::slotUser1()
{
QString destdir=KGlobal::dirs()->saveLocation("data","katepart/syntax/");
const QString destdir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/katepart/syntax/";
QDir(destdir).mkpath("."); // make sure the dir is there
foreach (QTreeWidgetItem *it, list->selectedItems())
{
QUrl src(it->text(4));
......
......@@ -1630,7 +1630,7 @@ void KateDocument::writeParameterizedSessionConfig(KConfigGroup &kconfig,
{
if ( this->url().isLocalFile() ) {
const QString path = this->url().toLocalFile();
if ( KGlobal::dirs()->relativeLocation( "tmp", path ) != path ) {
if ( path.startsWith(QDir::tempPath()) ) {
return; // inside tmp resource, do not save
}
}
......
......@@ -32,7 +32,6 @@
#include "katepartdebug.h"
#include <klocale.h>
#include <kglobal.h>
#include <klocalizedstring.h>
#include <kstandarddirs.h>
......@@ -68,7 +67,8 @@ QScriptValue read(QScriptContext *context, QScriptEngine *)
* skip on errors
*/
const QString name = context->argument(i).toString();
const QString fullName = KGlobal::dirs()->findResource ("data", "katepart/script/files/" + name);
const QString fullName = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"katepart/script/files/" + name);
if (fullName.isEmpty())
continue;
......@@ -103,7 +103,8 @@ QScriptValue require(QScriptContext *context, QScriptEngine *engine)
* skip on errors
*/
const QString name = context->argument(i).toString();
const QString fullName = KGlobal::dirs()->findResource ("data", "katepart/script/libraries/" + name);
const QString fullName = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"katepart/script/libraries/" + name);
if (fullName.isEmpty())
continue;
......
......@@ -37,7 +37,6 @@
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kglobal.h>
#include <kcomponentdata.h>
#include <klocale.h>
#include <kmenu.h>
......@@ -1089,7 +1088,7 @@ bool KateHighlighting::isInWord( QChar c, int attrib ) const
bool KateHighlighting::canBreakAt( QChar c, int attrib ) const
{
static const QString& sq = KGlobal::staticQString("\"'");
static const QString& sq = QStringLiteral("\"'");
return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.indexOf(c) != -1) && (sq.indexOf(c) == -1);
}
......
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