diff --git a/asyncdbconnection.cpp b/asyncdbconnection.cpp index 0eb8b0a..dafaffc 100644 --- a/asyncdbconnection.cpp +++ b/asyncdbconnection.cpp @@ -223,7 +223,8 @@ void ASyncDBConnection::Thread::waitForAndSendCommand() { WaitHandleList whl; auto wait_result_new_command = whl.add(m_commandQueue.m_newEvent); - auto wait_result_stop = whl.add(m_stopEvent); + //auto wait_result_stop = + whl.add(m_stopEvent); DWORD res = MsgWaitForMultipleObjectsEx( whl.count(), // _In_ DWORD nCount, diff --git a/connectionlistmodel.cpp b/connectionlistmodel.cpp index 6a0f087..cf85a07 100644 --- a/connectionlistmodel.cpp +++ b/connectionlistmodel.cpp @@ -158,7 +158,7 @@ Qt::ItemFlags ConnectionListModel::flags(const QModelIndex &index) const { Qt::ItemFlags result; int row = index.row(); - if (row >= 0 && row < m_connections.size()) { + if (row >= 0 && row < (int)m_connections.size()) { result = Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled; } return result; @@ -189,7 +189,7 @@ void ConnectionListModel::add(const ConnectionConfig &cfg) Expected ConnectionListModel::get(int row) { - if (row >= 0 && row < m_connections.size()) { + if (row >= 0 && row < (int)m_connections.size()) { return m_connections.at(row).m_config; } else { @@ -201,7 +201,7 @@ Expected ConnectionListModel::get(int row) bool ConnectionListModel::removeRows(int row, int count, const QModelIndex &parent) { bool result = false; - if (row >= 0 && row < m_connections.size()) { + if (row >= 0 && row < (int)m_connections.size()) { beginRemoveRows(parent, row, row + count -1); SCOPE_EXIT { endRemoveRows(); }; @@ -261,7 +261,7 @@ void ConnectionListModel::save() void ConnectionListModel::save(int index) { - if (index >= 0 && index < m_connections.size()) { + if (index >= 0 && index < (int)m_connections.size()) { auto& e = m_connections[index]; if (e.m_dirty) { QString file_name = iniFileName(); diff --git a/connectionmanagerwindow.cpp b/connectionmanagerwindow.cpp index 451a17c..231febd 100644 --- a/connectionmanagerwindow.cpp +++ b/connectionmanagerwindow.cpp @@ -50,7 +50,7 @@ void ConnectionManagerWindow::on_actionAdd_Connection_triggered() } void ConnectionManagerWindow::on_currentChanged(const QModelIndex ¤t, - const QModelIndex &previous) + const QModelIndex &) { int currow = current.row(); auto clm = m_masterController->getConnectionListModel(); diff --git a/opendatabase.cpp b/opendatabase.cpp index 06934d0..c86005a 100644 --- a/opendatabase.cpp +++ b/opendatabase.cpp @@ -6,8 +6,9 @@ Expected OpenDatabase::createOpenDatabase(const ConnectionConfig OpenDatabase *odb = new OpenDatabase(cfg, nullptr); if (odb->Init()) { - return odb; + } + return odb; //return Expected::fromException(std::out_of_range("Invalid row")); } diff --git a/queryexplainmodel.cpp b/queryexplainmodel.cpp index a1c1552..5e0a27d 100644 --- a/queryexplainmodel.cpp +++ b/queryexplainmodel.cpp @@ -206,7 +206,7 @@ int QueryExplainModel::rowCount(const QModelIndex &parent) const return result; } -int QueryExplainModel::columnCount(const QModelIndex &parent) const +int QueryExplainModel::columnCount(const QModelIndex &) const { // if (parent.isValid()) { // return 6;//static_cast(parent.internalPointer())->columnCount(); diff --git a/queryexplainmodel.h b/queryexplainmodel.h index 913ce3d..721c608 100644 --- a/queryexplainmodel.h +++ b/queryexplainmodel.h @@ -4,6 +4,8 @@ #include #include "explaintreemodelitem.h" +/** \brief Model class for displaying the explain of a query in a tree like format. + */ class QueryExplainModel : public QAbstractItemModel { Q_OBJECT