mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-05 21:14:20 -04:00
Port Tools::platform() to Qt 5.
The Q_WS_* definitions are gone.
This commit is contained in:
parent
6502da549b
commit
03a330a4dd
1 changed files with 17 additions and 10 deletions
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "Tools.h"
|
#include "Tools.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QApplication>
|
||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
#include <QIODevice>
|
#include <QIODevice>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
@ -211,15 +211,22 @@ void wait(int ms)
|
||||||
|
|
||||||
QString platform()
|
QString platform()
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_X11)
|
// TODO: move callers to QApplication::platformName()
|
||||||
return "x11";
|
|
||||||
#elif defined(Q_WS_MAC)
|
QString platform = QApplication::platformName();
|
||||||
return "mac";
|
|
||||||
#elif defined(Q_WS_WIN)
|
if (platform == "xcb") {
|
||||||
return "win";
|
return "x11";
|
||||||
#else
|
}
|
||||||
return QString();
|
else if (platform == "cocoa") {
|
||||||
#endif
|
return "mac";
|
||||||
|
}
|
||||||
|
else if (platform == "windows") {
|
||||||
|
return "win";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return platform;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void disableCoreDumps()
|
void disableCoreDumps()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue