mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 21:27:44 +02:00
Remove several warnings when building the project
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
@ -70,7 +70,7 @@ class NullInstance : public BaseInstance {
|
||||
return out;
|
||||
}
|
||||
QString modsRoot() const override { return QString(); }
|
||||
void updateRuntimeContext()
|
||||
void updateRuntimeContext() override
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
@ -501,7 +501,7 @@ QString JavaUtils::getJavaCheckPath()
|
||||
QStringList getMinecraftJavaBundle()
|
||||
{
|
||||
QStringList processpaths;
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
processpaths << FS::PathCombine(QDir::homePath(), FS::PathCombine("Library", "Application Support", "minecraft", "runtime"));
|
||||
#elif defined(Q_OS_WIN32)
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
||||
|
||||
#define IBUS "@im=ibus"
|
||||
|
||||
static bool switcherooSetupGPU(QProcessEnvironment& env)
|
||||
[[maybe_unused]] static bool switcherooSetupGPU(QProcessEnvironment& env)
|
||||
{
|
||||
#ifdef WITH_QTDBUS
|
||||
if (!QDBusConnection::systemBus().isConnected())
|
||||
|
@ -45,7 +45,7 @@ bool MCEditTool::check(const QString& toolPath, QString& error)
|
||||
|
||||
QString MCEditTool::getProgramPath()
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
return path();
|
||||
#else
|
||||
const QString mceditPath = path();
|
||||
|
@ -156,7 +156,7 @@ void ExternalToolsPage::on_mceditPathBtn_clicked()
|
||||
QString raw_dir = ui->mceditPathEdit->text();
|
||||
QString error;
|
||||
do {
|
||||
#ifdef Q_OS_OSX
|
||||
#ifdef Q_OS_MACOS
|
||||
raw_dir = QFileDialog::getOpenFileName(this, tr("MCEdit Application"), raw_dir);
|
||||
#else
|
||||
raw_dir = QFileDialog::getExistingDirectory(this, tr("MCEdit Folder"), raw_dir);
|
||||
|
@ -16,7 +16,7 @@ void ServerPingTask::executeTask()
|
||||
|
||||
// Resolve the actual IP and port for the server
|
||||
McResolver* resolver = new McResolver(nullptr, m_domain, m_port);
|
||||
QObject::connect(resolver, &McResolver::succeeded, this, [this, resolver](QString ip, int port) {
|
||||
QObject::connect(resolver, &McResolver::succeeded, this, [this](QString ip, int port) {
|
||||
qDebug() << "Resolved Address for" << m_domain << ": " << ip << ":" << port;
|
||||
|
||||
// Now that we have the IP and port, query the server
|
||||
@ -30,7 +30,7 @@ void ServerPingTask::executeTask()
|
||||
QObject::connect(client, &McClient::failed, this, [this](QString error) { emitFailed(error); });
|
||||
|
||||
// Delete McClient object when done
|
||||
QObject::connect(client, &McClient::finished, this, [this, client]() { client->deleteLater(); });
|
||||
QObject::connect(client, &McClient::finished, this, [client]() { client->deleteLater(); });
|
||||
client->getStatusData();
|
||||
});
|
||||
QObject::connect(resolver, &McResolver::failed, this, [this](QString error) { emitFailed(error); });
|
||||
|
@ -36,7 +36,7 @@ namespace FTBImportAPP {
|
||||
QString getFTBRoot()
|
||||
{
|
||||
QString partialPath = QDir::homePath();
|
||||
#if defined(Q_OS_OSX)
|
||||
#if defined(Q_OS_MACOS)
|
||||
partialPath = FS::PathCombine(partialPath, "Library/Application Support");
|
||||
#endif
|
||||
return FS::PathCombine(partialPath, ".ftba");
|
||||
|
@ -166,7 +166,7 @@ void MacSparkleUpdater::setAllowedChannels(const QSet<QString>& channels) {
|
||||
QString channelsConfig = "";
|
||||
// Convert QSet<QString> -> NSSet<NSString>
|
||||
NSMutableSet<NSString*>* nsChannels = [NSMutableSet setWithCapacity:channels.count()];
|
||||
for (const QString channel : channels) {
|
||||
for (const QString& channel : channels) {
|
||||
[nsChannels addObject:channel.toNSString()];
|
||||
channelsConfig += channel + " ";
|
||||
}
|
||||
|
Reference in New Issue
Block a user