Use qGuiApp instead of qApp

As QtQuick applications might not have QApplication.
This commit is contained in:
Sergio Martins
2022-06-06 13:21:35 +01:00
parent 995df8e3e8
commit 5faf36700b
24 changed files with 72 additions and 68 deletions

View File

@@ -208,6 +208,7 @@ void DockWidgetModel::emitDataChangedFor(Controllers::DockWidget *dw)
void DockWidgetModel::remove(Controllers::DockWidget *dw)
{
qDebug() << Q_FUNC_INFO << dw->uniqueName();
QScopedValueRollback<bool> guard(m_removeGuard, true);
const int row = indexOf(dw);
if (row == -1) {
@@ -224,6 +225,7 @@ void DockWidgetModel::remove(Controllers::DockWidget *dw)
beginRemoveRows(QModelIndex(), row, row);
m_dockWidgets.removeOne(dw);
qDebug() << "Removed one from " << row;
endRemoveRows();
Q_EMIT countChanged();