Fix warning on SQL Browser startup

Browser::addConnection is not a slot/invokable, and requires arguments.

What was probably meant to happen is that the connection dialog
opens.

Pick-to: 6.6 6.5
Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 3552afe38a6ba3feebe4fd9ecd561a8c0c2b9717)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Kai Köhne 2024-01-12 12:30:59 +01:00 committed by Qt Cherry-pick Bot
parent 0b04acd1f0
commit bfc841f149

View File

@ -48,7 +48,8 @@ int main(int argc, char *argv[])
addConnectionsFromCommandline(app.arguments(), &browser);
mainWin.show();
if (QSqlDatabase::connectionNames().isEmpty())
QMetaObject::invokeMethod(&browser, "addConnection", Qt::QueuedConnection);
QMetaObject::invokeMethod(&browser, &Browser::openNewConnectionDialog,
Qt::QueuedConnection);
return app.exec();
}