NOISSUE fix a bunch of warnings thrown by Qt internals
Badly connected signals/slots and similar things.
This commit is contained in:
parent
ef2cbe16e6
commit
f18afd3d1e
@ -205,6 +205,10 @@ void VersionList::merge(const BaseEntity::Ptr &other)
|
||||
// TODO: do not reset the whole model. maybe?
|
||||
beginResetModel();
|
||||
m_versions.clear();
|
||||
if(list->m_versions.isEmpty())
|
||||
{
|
||||
qWarning() << "Empty list loaded ...";
|
||||
}
|
||||
for (const VersionPtr &version : list->m_versions)
|
||||
{
|
||||
// we already have the version. merge the contents
|
||||
|
@ -744,23 +744,23 @@ bool ComponentList::revertToBase(int index)
|
||||
return true;
|
||||
}
|
||||
|
||||
ComponentPtr ComponentList::getComponent(const QString &id)
|
||||
Component * ComponentList::getComponent(const QString &id)
|
||||
{
|
||||
auto iter = d->componentIndex.find(id);
|
||||
if (iter == d->componentIndex.end())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return *iter;
|
||||
return (*iter).get();
|
||||
}
|
||||
|
||||
ComponentPtr ComponentList::getComponent(int index)
|
||||
Component * ComponentList::getComponent(int index)
|
||||
{
|
||||
if(index < 0 || index >= d->components.size())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
return d->components[index];
|
||||
return d->components[index].get();
|
||||
}
|
||||
|
||||
bool ComponentList::isVanilla()
|
||||
|
@ -110,10 +110,10 @@ public:
|
||||
|
||||
public:
|
||||
/// get the profile component by id
|
||||
ComponentPtr getComponent(const QString &id);
|
||||
Component * getComponent(const QString &id);
|
||||
|
||||
/// get the profile component by index
|
||||
ComponentPtr getComponent(int index);
|
||||
Component * getComponent(int index);
|
||||
|
||||
private:
|
||||
void scheduleSave();
|
||||
|
@ -779,6 +779,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
|
||||
{
|
||||
bool updatesAllowed = MMC->updatesAreAllowed();
|
||||
updatesAllowedChanged(updatesAllowed);
|
||||
|
||||
connect(ui->actionCheckUpdate, &QAction::triggered, this, &MainWindow::checkForUpdates);
|
||||
|
||||
// set up the updater object.
|
||||
auto updater = MMC->updateChecker();
|
||||
connect(updater.get(), &UpdateChecker::updateAvailable, this, &MainWindow::updateAvailable);
|
||||
@ -868,7 +871,7 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
|
||||
QVariantMap data;
|
||||
data["group"] = group;
|
||||
actionDeleteGroup->setData(data);
|
||||
connect(actionDeleteGroup, SIGNAL(triggered(bool)), SLOT(on_actionDeleteGroup_triggered()));
|
||||
connect(actionDeleteGroup, SIGNAL(triggered(bool)), SLOT(deleteGroup()));
|
||||
actions.append(actionDeleteGroup);
|
||||
}
|
||||
}
|
||||
@ -1080,7 +1083,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
|
||||
on_actionDeleteInstance_triggered();
|
||||
return true;
|
||||
case Qt::Key_F5:
|
||||
on_actionRefresh_triggered();
|
||||
refreshInstances();
|
||||
return true;
|
||||
case Qt::Key_F2:
|
||||
on_actionRenameInstance_triggered();
|
||||
@ -1450,7 +1453,7 @@ void MainWindow::on_actionChangeInstGroup_triggered()
|
||||
m_selectedInstance->setGroupPost(name);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDeleteGroup_triggered()
|
||||
void MainWindow::deleteGroup()
|
||||
{
|
||||
QObject* obj = sender();
|
||||
if(!obj)
|
||||
@ -1474,7 +1477,7 @@ void MainWindow::on_actionViewInstanceFolder_triggered()
|
||||
DesktopServices::openDirectory(str);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionRefresh_triggered()
|
||||
void MainWindow::refreshInstances()
|
||||
{
|
||||
MMC->instances()->loadList(true);
|
||||
}
|
||||
@ -1493,7 +1496,7 @@ void MainWindow::on_actionConfig_Folder_triggered()
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCheckUpdate_triggered()
|
||||
void MainWindow::checkForUpdates()
|
||||
{
|
||||
if(BuildConfig.UPDATER_ENABLED)
|
||||
{
|
||||
|
@ -85,11 +85,11 @@ private slots:
|
||||
|
||||
void on_actionViewSelectedInstFolder_triggered();
|
||||
|
||||
void on_actionRefresh_triggered();
|
||||
void refreshInstances();
|
||||
|
||||
void on_actionViewCentralModsFolder_triggered();
|
||||
|
||||
void on_actionCheckUpdate_triggered();
|
||||
void checkForUpdates();
|
||||
|
||||
void on_actionSettings_triggered();
|
||||
|
||||
@ -113,7 +113,7 @@ private slots:
|
||||
|
||||
void on_actionDeleteInstance_triggered();
|
||||
|
||||
void on_actionDeleteGroup_triggered();
|
||||
void deleteGroup();
|
||||
|
||||
void on_actionExportInstance_triggered();
|
||||
|
||||
|
@ -141,9 +141,9 @@ LogPage::LogPage(InstancePtr instance, QWidget *parent)
|
||||
auto launchTask = m_instance->getLaunchTask();
|
||||
if(launchTask)
|
||||
{
|
||||
on_InstanceLaunchTask_changed(launchTask);
|
||||
onInstanceLaunchTaskChanged(launchTask);
|
||||
}
|
||||
connect(m_instance.get(), &BaseInstance::launchTaskChanged, this, &LogPage::on_InstanceLaunchTask_changed);
|
||||
connect(m_instance.get(), &BaseInstance::launchTaskChanged, this, &LogPage::onInstanceLaunchTaskChanged);
|
||||
}
|
||||
|
||||
ui->text->setWordWrap(true);
|
||||
@ -162,7 +162,7 @@ LogPage::~LogPage()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void LogPage::on_InstanceLaunchTask_changed(std::shared_ptr<LaunchTask> proc)
|
||||
void LogPage::onInstanceLaunchTaskChanged(std::shared_ptr<LaunchTask> proc)
|
||||
{
|
||||
m_process = proc;
|
||||
if(m_process)
|
||||
|
@ -69,7 +69,7 @@ private slots:
|
||||
void findNextActivated();
|
||||
void findPreviousActivated();
|
||||
|
||||
void on_InstanceLaunchTask_changed(std::shared_ptr<LaunchTask> proc);
|
||||
void onInstanceLaunchTaskChanged(std::shared_ptr<LaunchTask> proc);
|
||||
|
||||
private:
|
||||
Ui::LogPage *ui;
|
||||
|
@ -9,7 +9,7 @@ SystemTheme::SystemTheme()
|
||||
const auto & style = QApplication::style();
|
||||
systemPalette = style->standardPalette();
|
||||
QString lowerThemeName = style->objectName();
|
||||
qWarning() << systemTheme;
|
||||
qDebug() << systemTheme;
|
||||
QStringList styles = QStyleFactory::keys();
|
||||
for(auto &st: styles)
|
||||
{
|
||||
@ -21,7 +21,7 @@ SystemTheme::SystemTheme()
|
||||
}
|
||||
// fall back to fusion if we can't find the current theme.
|
||||
systemTheme = "Fusion";
|
||||
qWarning() << "System theme not found, defaulted to Fusion";
|
||||
qDebug() << "System theme not found, defaulted to Fusion";
|
||||
}
|
||||
|
||||
void SystemTheme::apply(bool initial)
|
||||
|
Loading…
Reference in New Issue
Block a user