Remove unused utilities functions

This commit is contained in:
Jonas Kvinge 2020-10-18 14:12:01 +02:00
parent 7ca65c81d8
commit 0e258a5a32
2 changed files with 0 additions and 29 deletions

View File

@ -762,29 +762,6 @@ bool IsLaptop() {
}
bool UrlOnSameDriveAsStrawberry(const QUrl &url) {
if (!url.isValid() || !url.isLocalFile() || url.toLocalFile().isEmpty()) return false;
#ifdef Q_OS_WIN
QUrl appUrl = QUrl::fromLocalFile(QCoreApplication::applicationDirPath());
if (url.toLocalFile().left(1) == appUrl.toLocalFile().left(1))
return true;
else
return false;
#else
// Non windows systems have always a / in the path
return true;
#endif
}
QUrl GetRelativePathToStrawberryBin(const QUrl &url) {
if (!url.isValid()) return QUrl();
QDir appPath(QCoreApplication::applicationDirPath());
return QUrl::fromLocalFile(appPath.relativeFilePath(url.toLocalFile()));
}
QString GetEnv(const QString &key) {
return QString::fromLocal8Bit(qgetenv(key.toLocal8Bit()));
}

View File

@ -108,12 +108,6 @@ const char *EnumToString(const QMetaObject &meta, const char *name, int value);
QStringList Prepend(const QString &text, const QStringList &list);
QStringList Updateify(const QStringList &list);
// Check if two urls are on the same drive (mainly for windows)
bool UrlOnSameDriveAsStrawberry(const QUrl &url);
// Get relative path to Strawberry binary
QUrl GetRelativePathToStrawberryBin(const QUrl &url);
QString GetEnv(const QString &key);
void SetEnv(const char *key, const QString &value);
void IncreaseFDLimit();