Commit b78cfd45ce5c979ab646cb280ef96bceec9a7419

Authored by Steven de Ridder
1 parent cb1cc3f7

Qt6 / c++17 changes.

CMakeLists.txt
@@ -24,6 +24,8 @@ endif() @@ -24,6 +24,8 @@ endif()
24 24
25 # ============================================================================== 25 # ==============================================================================
26 26
  27 +set(CMAKE_CXX_STANDARD 17)
  28 +
27 include(projectheader) 29 include(projectheader)
28 project_header(osdev_dbconnector) 30 project_header(osdev_dbconnector)
29 31
src/CMakeLists.txt
@@ -25,12 +25,12 @@ endif() @@ -25,12 +25,12 @@ endif()
25 include(projectheader) 25 include(projectheader)
26 project_header(dbconnector) 26 project_header(dbconnector)
27 27
28 -find_package( Qt5Core REQUIRED )  
29 -find_package( Qt5Sql REQUIRED ) 28 +find_package( Qt6Core REQUIRED )
  29 +find_package( Qt6Sql REQUIRED )
30 30
31 include_directories( SYSTEM 31 include_directories( SYSTEM
32 - ${Qt5Core_INCLUDE_DIRS}  
33 - ${Qt5Sql_INCLUDE_DIRS} 32 + ${Qt6Core_INCLUDE_DIRS}
  33 + ${Qt6Sql_INCLUDE_DIRS}
34 ) 34 )
35 35
36 include(compiler) 36 include(compiler)
src/dbconnector.cpp
@@ -509,7 +509,7 @@ bool DbConnector::recordsExist( const QString& sTable, const QString& sField, co @@ -509,7 +509,7 @@ bool DbConnector::recordsExist( const QString& sTable, const QString& sField, co
509 { 509 {
510 valueList.append(this->toSqlValueString(v)); 510 valueList.append(this->toSqlValueString(v));
511 } 511 }
512 - QStringList uniqueValueList = valueList.toSet().toList(); 512 + QStringList uniqueValueList = valueList.toList();
513 auto queryResult = this->executeQuery(countQuery 513 auto queryResult = this->executeQuery(countQuery
514 .arg(this->quoteTableName(sTable)) 514 .arg(this->quoteTableName(sTable))
515 .arg(this->quoteFieldName(sField)) 515 .arg(this->quoteFieldName(sField))
src/dbconnector.h
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 38
39 class QSqlQuery; 39 class QSqlQuery;
40 class QString; 40 class QString;
41 -class QStringList; 41 +//class QStringList;
42 template<class K, class V> class QHash; 42 template<class K, class V> class QHash;
43 class QSqlDatabase; 43 class QSqlDatabase;
44 44