Index: sources/view/VNetworkModel.cpp =================================================================== diff -u -rc77365fa76422bc2150e58d483c446325b50f4b8 -rf35b360054e1e2fa81bf107427fe2d50d78e9e8a --- sources/view/VNetworkModel.cpp (.../VNetworkModel.cpp) (revision c77365fa76422bc2150e58d483c446325b50f4b8) +++ sources/view/VNetworkModel.cpp (.../VNetworkModel.cpp) (revision f35b360054e1e2fa81bf107427fe2d50d78e9e8a) @@ -1,5 +1,6 @@ // Qt +#include // Project #include "VNetworkModel.h" @@ -16,19 +17,19 @@ { // incoming connect(&_WifiInterface, SIGNAL(didAddNetwork(const Network)), - this, SLOT(doAddNetwork(const Network)), Qt::QueuedConnection); + this, SLOT(doAddNetwork(const Network))); connect(&_WifiInterface, SIGNAL(didScanStatusChanged(const bool)), - this, SLOT(onScanStatusChanged(const bool)), Qt::QueuedConnection); + this, SLOT(onScanStatusChanged(const bool))); connect(&_WifiInterface, SIGNAL(didConnectToNetwork(const Network)), - this, SLOT(onConnectedToNetwork(const Network)), Qt::QueuedConnection); + this, SLOT(onConnectedToNetwork(const Network))); connect(&_WifiInterface, SIGNAL(didDisconnectNetwork(Network)), - this, SLOT(onDisconnectedNetwork(const Network)), Qt::QueuedConnection); + this, SLOT(onDisconnectedNetwork(const Network))); connect(&_WifiInterface, SIGNAL(didError(const QString)), - this, SLOT(onError(const QString)), Qt::QueuedConnection); + this, SLOT(onError(const QString))); // outgoing connect(this, SIGNAL(didScan()), @@ -65,7 +66,8 @@ * \param parent - (QModelIndex) the parent QModelIndex * \return (int) - the number of networks */ -int VNetworkModel::rowCount(const QModelIndex & parent) const { +int VNetworkModel::rowCount(const QModelIndex & parent) const +{ Q_UNUSED(parent); return _networks.count(); } @@ -77,8 +79,8 @@ * \param role - (int) the property index to return. See NetworkDataRole * \return (QVariant) - the value for the specified network property */ -QVariant VNetworkModel::data(const QModelIndex & index, int role) const { - +QVariant VNetworkModel::data(const QModelIndex & index, int role) const +{ if (index.row() < 0 || index.row() >= _networks.count()) return QVariant(); @@ -121,6 +123,7 @@ * Handles when a user clicks the Scan button */ void VNetworkModel::doScan() { + qDebug() << __FUNCTION__ << QThread::currentThread()->objectName(); status(tr("Scanning...")); emit didScan(); }