comparison src/util.h @ 271:df3f902588af

Add parent window argument to slErrorMsg() and use it. Also use main window as parent for other static/modal dialogs.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 17 Mar 2023 13:09:43 +0200
parents 55581d90c55d
children 0f345852b3ed
comparison
equal deleted inserted replaced
270:8c6fb6ee6f9e 271:df3f902588af
6 // Distributed under 3-clause BSD style license, refer to 6 // Distributed under 3-clause BSD style license, refer to
7 // included file "COPYING" for exact terms. 7 // included file "COPYING" for exact terms.
8 // 8 //
9 #ifndef SL_UTIL_H 9 #ifndef SL_UTIL_H
10 #define SL_UTIL_H 10 #define SL_UTIL_H
11
12
13 #include <QWidget>
11 14
12 15
13 #define SQL_MAX_SCHEMA_INSERTS 16 16 #define SQL_MAX_SCHEMA_INSERTS 16
14 17
15 18
35 38
36 const QDateTime slDateTimeToLocal(const QDateTime &val); 39 const QDateTime slDateTimeToLocal(const QDateTime &val);
37 const QString slDateTimeToStr(const QDateTime &val); 40 const QString slDateTimeToStr(const QDateTime &val);
38 41
39 void slLog(const QString &mtype, const QString &msg); 42 void slLog(const QString &mtype, const QString &msg);
40 int slErrorMsg(const QString &title, const QString &msg); 43 int slErrorMsg(QWidget *parent, const QString &title, const QString &msg);
41 44
42 bool slCheckAndReportSQLError(const QSqlQuery &query, const QString where, bool report = false); 45 bool slCheckAndReportSQLError(const QSqlQuery &query, const QString where, bool report = false);
43 bool slConditionallyCreateSQLTables(QSqlDatabase &db, const SLSQLSchemaDef *schema, const int nschema); 46 bool slConditionallyCreateSQLTables(QSqlDatabase &db, const SLSQLSchemaDef *schema, const int nschema);
44 47
45 48