mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-21 09:31:32 -08:00
Replace deprecated parts of the code (#2419)
Performing a dev build against the latest version of Qt failed because of some deprecated members. They have been replaced according to the Qt documentation. Further, Q_OS_MACOS is now the only macro available to identify a machine running macOS, the others are now deprecated. See https://doc.qt.io/qt-5/qtglobal.html#Q_OS_OSX and https://doc.qt.io/qt-5/qtglobal.html#Q_OS_MAC.
This commit is contained in:
1 parent
efdb43dc53
commit
f31d65bdaf
26 files changed
+57
-47
No files matched your search
@@ -135,11 +135,11 @@ void NativeMessagingBase::sendReply(const QString& reply)
|
||||
QString NativeMessagingBase::getLocalServerPath() const
|
||||
{
|
||||
const QString serverPath = "/kpxc_server";
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
|
||||
// Use XDG_RUNTIME_DIR instead of /tmp if it's available
|
||||
QString path = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
|
||||
return path.isEmpty() ? QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverPath : path + serverPath;
|
||||
#else // Q_OS_MAC, Q_OS_WIN and others
|
||||
#else // Q_OS_MACOS, Q_OS_WIN and others
|
||||
return QStandardPaths::writableLocation(QStandardPaths::TempLocation) + serverPath;
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user