Commit d90f945c authored by AlmAck's avatar AlmAck
Browse files

due the fact that KF5 uses the flag "QT_NO_CAST_FROM_ASCII" we can't cast...

due the fact that KF5 uses the flag "QT_NO_CAST_FROM_ASCII" we can't cast directly a string, but instead we must use QLatin1String
even the flag "QT_NO_URL_CAST_FROM_STRING" is set, we can't cast a QString to QUrl directly, but instead use the setUrl function
Modified only the _global.h header, is the one used by external applications (like discover)
parent 767e027e
......@@ -13,7 +13,15 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# KF5 global definitions, use them to be compatible with KF5 applications
set(MAJOR_AKABEI_VERSION 0 CACHE INT "Akabei’s major version number" FORCE)
set(MINOR_AKABEI_VERSION 0 CACHE INT "Akabei’s minor version number" FORCE)
......@@ -13,6 +13,7 @@
#include <qglobal.h>
#include <QUrl>
#include <QString>
......@@ -125,12 +126,12 @@ namespace Hooks {
const QUrl DEFAULT_DATABASE_DIR("/var/lib/akabei");
const QUrl DEFAULT_CACHE_DIR("/var/cache/akabei/pkg");
const QUrl DEFAULT_DATABASE_DIR(QLatin1String("/var/lib/akabei"));
const QUrl DEFAULT_CACHE_DIR(QLatin1String("/var/cache/akabei/pkg"));
const QString errorPrefix = ":: ";
const QString packageExtension = ".tar.xz";
const QString signatureExtension = ".sig";
const QString errorPrefix = QLatin1String(":: ");
const QString packageExtension = QLatin1String(".tar.xz");
const QString signatureExtension = QLatin1String(".sig");
enum ProcessingOption
......@@ -72,7 +72,7 @@ bool PolKitArchiveHandler::write(const QString& filename, const QHash<QString, Q
QUrl file(filename);
if (file.isRelative()) {
file = QDir::current().absoluteFilePath(file.toString());
if (Akabei::Helpers::permissionsOfPath(QFileInfo(file.toString()).absolutePath()) & Akabei::Helpers::WritePermission) {
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