summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2024-01-12 12:30:59 +0100
committerKai Köhne <kai.koehne@qt.io>2024-01-12 19:35:04 +0100
commit3552afe38a6ba3feebe4fd9ecd561a8c0c2b9717 (patch)
treee4d6bb55383a644bc9dc6f8b124085b5ab474828
parent8594fe1b8dc848d8a2d61197acce67963f5fe20e (diff)
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.5 6.6 6.7 Change-Id: I4e6bffb3e0277ca3deb7111cf4bb47ff188f6f16 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
-rw-r--r--examples/sql/sqlbrowser/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/sql/sqlbrowser/main.cpp b/examples/sql/sqlbrowser/main.cpp
index 445c04637e..d57a59173b 100644
--- a/examples/sql/sqlbrowser/main.cpp
+++ b/examples/sql/sqlbrowser/main.cpp
@@ -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();
}