summaryrefslogtreecommitdiffstats
path: root/examples/sql/connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sql/connection.h')
-rw-r--r--examples/sql/connection.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/sql/connection.h b/examples/sql/connection.h
index 3bedf4b061..482feff5b4 100644
--- a/examples/sql/connection.h
+++ b/examples/sql/connection.h
@@ -70,12 +70,12 @@ static bool createConnection()
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(":memory:");
if (!db.open()) {
- QMessageBox::critical(0, qApp->tr("Cannot open database"),
- qApp->tr("Unable to establish a database connection.\n"
- "This example needs SQLite support. Please read "
- "the Qt SQL driver documentation for information how "
- "to build it.\n\n"
- "Click Cancel to exit."), QMessageBox::Cancel);
+ QMessageBox::critical(nullptr, QObject::tr("Cannot open database"),
+ QObject::tr("Unable to establish a database connection.\n"
+ "This example needs SQLite support. Please read "
+ "the Qt SQL driver documentation for information how "
+ "to build it.\n\n"
+ "Click Cancel to exit."), QMessageBox::Cancel);
return false;
}