mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fix ignoring return value of function declared with 'nodiscard' attribute
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
eda4592f19
commit
f26a4f897c
1 changed files with 8 additions and 2 deletions
|
|
@ -953,7 +953,10 @@ QString createShortcut(QString destination, QString target, QStringList args, QS
|
|||
qWarning() << "Couldn't create directories within application";
|
||||
return QString();
|
||||
}
|
||||
info.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
if (!info.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
qWarning() << "Failed to open file" << info.fileName() << "for writing!";
|
||||
return QString();
|
||||
}
|
||||
|
||||
QFile(icon).rename(resources.path() + "/Icon.icns");
|
||||
|
||||
|
|
@ -961,7 +964,10 @@ QString createShortcut(QString destination, QString target, QStringList args, QS
|
|||
QString exec = binaryDir.path() + "/Run.command";
|
||||
|
||||
QFile f(exec);
|
||||
f.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
if (!f.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
qWarning() << "Failed to open file" << f.fileName() << "for writing!";
|
||||
return QString();
|
||||
}
|
||||
QTextStream stream(&f);
|
||||
|
||||
auto argstring = quoteArgs(args, "\"", "\\\"");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue