Fixed some warnings (left some because they need more attention)
This commit is contained in:
parent
ccae3685ac
commit
468779ba38
6 changed files with 12 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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<ConnectionConfig> 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<ConnectionConfig> 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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ Expected<OpenDatabase*> OpenDatabase::createOpenDatabase(const ConnectionConfig
|
|||
OpenDatabase *odb = new OpenDatabase(cfg, nullptr);
|
||||
if (odb->Init()) {
|
||||
|
||||
return odb;
|
||||
|
||||
}
|
||||
return odb;
|
||||
//return Expected<ConnectionConfig>::fromException(std::out_of_range("Invalid row"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ExplainTreeModelItem*>(parent.internalPointer())->columnCount();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <string>
|
||||
#include "explaintreemodelitem.h"
|
||||
|
||||
/** \brief Model class for displaying the explain of a query in a tree like format.
|
||||
*/
|
||||
class QueryExplainModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue