Remove unused utilities functions
This commit is contained in:
parent
7ca65c81d8
commit
0e258a5a32
@ -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()));
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user