make `isGreenEdition` constexpr on Unix (#392)
This commit is contained in:
parent
4797e53b61
commit
5e9d9504d2
|
@ -335,10 +335,9 @@ int getNewFileNumber()
|
|||
#ifdef Q_OS_WIN
|
||||
static bool gIsGreenEdition = true;
|
||||
static bool gIsGreenEditionInited = false;
|
||||
#endif
|
||||
|
||||
bool isGreenEdition()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
if (!gIsGreenEditionInited) {
|
||||
QString appPath = QApplication::instance()->applicationDirPath();
|
||||
appPath = excludeTrailingPathDelimiter(localizePath(appPath));
|
||||
|
@ -364,10 +363,8 @@ bool isGreenEdition()
|
|||
gIsGreenEditionInited = true;
|
||||
}
|
||||
return gIsGreenEdition;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
QByteArray runAndGetOutput(const QString &cmd, const QString& workingDir, const QStringList& arguments,
|
||||
const QByteArray &inputContent, bool inheritEnvironment,
|
||||
|
|
|
@ -155,7 +155,11 @@ void executeFile(const QString& fileName,
|
|||
const QString& workingDir,
|
||||
const QString& tempFile);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
bool isGreenEdition();
|
||||
#else
|
||||
constexpr bool isGreenEdition() { return false; }
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
bool readRegistry(HKEY key, const QString& subKey, const QString& name, QString& value);
|
||||
|
|
Loading…
Reference in New Issue