Remove unused utilities functions
This commit is contained in:
@@ -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) {
|
QString GetEnv(const QString &key) {
|
||||||
return QString::fromLocal8Bit(qgetenv(key.toLocal8Bit()));
|
return QString::fromLocal8Bit(qgetenv(key.toLocal8Bit()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,12 +108,6 @@ const char *EnumToString(const QMetaObject &meta, const char *name, int value);
|
|||||||
QStringList Prepend(const QString &text, const QStringList &list);
|
QStringList Prepend(const QString &text, const QStringList &list);
|
||||||
QStringList Updateify(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);
|
QString GetEnv(const QString &key);
|
||||||
void SetEnv(const char *key, const QString &value);
|
void SetEnv(const char *key, const QString &value);
|
||||||
void IncreaseFDLimit();
|
void IncreaseFDLimit();
|
||||||
|
|||||||
Reference in New Issue
Block a user