Disable use of Qt APIs deprecated in 5.15.0 and earlier versions (#4133)
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
namespace ipc = boost::interprocess;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
# include <QProcess>
|
||||
# include <QSettings>
|
||||
|
||||
# include <Windows.h>
|
||||
# include "singletons/WindowManager.hpp"
|
||||
@@ -98,9 +98,8 @@ void registerNmManifest(Paths &paths, const QString &manifestFilename,
|
||||
file.flush();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// clang-format off
|
||||
QProcess::execute("REG ADD \"" + registryKeyName + "\" /ve /t REG_SZ /d \"" + manifestPath + "\" /f");
|
||||
// clang-format on
|
||||
QSettings registry(registryKeyName, QSettings::NativeFormat);
|
||||
registry.setValue("Default", manifestPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -179,10 +179,10 @@ void Updates::installUpdates()
|
||||
})
|
||||
.onSuccess([this](auto result) -> Outcome {
|
||||
QByteArray object = result.getData();
|
||||
auto filename =
|
||||
auto filePath =
|
||||
combinePath(getPaths()->miscDirectory, "Update.exe");
|
||||
|
||||
QFile file(filename);
|
||||
QFile file(filePath);
|
||||
file.open(QIODevice::Truncate | QIODevice::WriteOnly);
|
||||
|
||||
if (file.write(object) == -1)
|
||||
@@ -203,7 +203,7 @@ void Updates::installUpdates()
|
||||
file.flush();
|
||||
file.close();
|
||||
|
||||
if (QProcess::startDetached(filename))
|
||||
if (QProcess::startDetached(filePath, {}))
|
||||
{
|
||||
QApplication::exit(0);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ void LoggingChannel::addMessage(MessagePtr message)
|
||||
|
||||
QString LoggingChannel::generateOpeningString(const QDateTime &now) const
|
||||
{
|
||||
QString ret = QLatin1Literal("# Start logging at ");
|
||||
QString ret("# Start logging at ");
|
||||
|
||||
ret.append(now.toString("yyyy-MM-dd HH:mm:ss "));
|
||||
ret.append(now.timeZoneAbbreviation());
|
||||
@@ -120,7 +120,7 @@ QString LoggingChannel::generateOpeningString(const QDateTime &now) const
|
||||
|
||||
QString LoggingChannel::generateClosingString(const QDateTime &now) const
|
||||
{
|
||||
QString ret = QLatin1Literal("# Stop logging at ");
|
||||
QString ret("# Stop logging at ");
|
||||
|
||||
ret.append(now.toString("yyyy-MM-dd HH:mm:ss"));
|
||||
ret.append(now.timeZoneAbbreviation());
|
||||
|
||||
Reference in New Issue
Block a user