Use new connect api

wilder-5.14
Montel Laurent 11 years ago
parent 8b7c7c8dfa
commit eb28bc0695
  1. 8
      dataengines/dict/dictengine.cpp
  2. 9
      dataengines/filebrowser/filebrowserengine.cpp
  3. 13
      dataengines/keystate/keystate.cpp

@ -116,7 +116,7 @@ void DictEngine::getDefinition()
ret += m_tcpSocket->readAll();
}
connect(m_tcpSocket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
connect(m_tcpSocket, &QTcpSocket::disconnected, this, &DictEngine::socketClosed);
m_tcpSocket->disconnectFromHost();
// setData(m_currentWord, m_dictName, ret);
// qWarning()<<ret;
@ -222,12 +222,12 @@ bool DictEngine::sourceRequestEvent(const QString &query)
setData(m_currentWord, m_dictName, QString());
m_tcpSocket = new QTcpSocket(this);
m_tcpSocket->abort();
connect(m_tcpSocket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
connect(m_tcpSocket, &QTcpSocket::disconnected, this, &DictEngine::socketClosed);
if (m_currentWord == "list-dictionaries") {
connect(m_tcpSocket, SIGNAL(readyRead()), this, SLOT(getDicts()));
connect(m_tcpSocket, &QTcpSocket::readyRead, this, &DictEngine::getDicts);
} else {
connect(m_tcpSocket, SIGNAL(readyRead()), this, SLOT(getDefinition()));
connect(m_tcpSocket, &QTcpSocket::readyRead, this, &DictEngine::getDefinition);
}
m_tcpSocket->connectToHost(m_serverName, 2628);

@ -36,12 +36,9 @@ FileBrowserEngine::FileBrowserEngine(QObject* parent, const QVariantList& args)
Q_UNUSED(args)
m_dirWatch = new KDirWatch(this);
connect(m_dirWatch, SIGNAL(created(
const QString &)), this, SLOT(dirCreated(QString)));
connect(m_dirWatch, SIGNAL(deleted(
const QString &)), this, SLOT(dirDeleted(QString)));
connect(m_dirWatch, SIGNAL(dirty(
const QString &)), this, SLOT(dirDirty(QString)));
connect(m_dirWatch, &KDirWatch::created, this, &FileBrowserEngine::dirCreated);
connect(m_dirWatch, &KDirWatch::deleted, this, &FileBrowserEngine::dirDeleted);
connect(m_dirWatch, &KDirWatch::dirty, this, &FileBrowserEngine::dirDirty);
}
FileBrowserEngine::~FileBrowserEngine()

@ -71,13 +71,12 @@ void KeyStatesEngine::init()
setData(it2.value(), data);
}
connect(&m_keyInfo, SIGNAL(keyPressed(Qt::Key,bool)), this, SLOT(keyPressed(Qt::Key,bool)));
connect(&m_keyInfo, SIGNAL(keyLatched(Qt::Key,bool)), this, SLOT(keyLatched(Qt::Key,bool)));
connect(&m_keyInfo, SIGNAL(keyLocked(Qt::Key,bool)), this, SLOT(keyLocked(Qt::Key,bool)));
connect(&m_keyInfo, SIGNAL(buttonPressed(Qt::MouseButton,bool)),
this, SLOT(mouseButtonPressed(Qt::MouseButton,bool)));
connect(&m_keyInfo, SIGNAL(keyAdded(Qt::Key)), this, SLOT(keyAdded(Qt::Key)));
connect(&m_keyInfo, SIGNAL(keyRemoved(Qt::Key)), this, SLOT(keyRemoved(Qt::Key)));
connect(&m_keyInfo, &KModifierKeyInfo::keyPressed, this, &KeyStatesEngine::keyPressed);
connect(&m_keyInfo, &KModifierKeyInfo::keyLatched, this, &KeyStatesEngine::keyLatched);
connect(&m_keyInfo, &KModifierKeyInfo::keyLocked, this, &KeyStatesEngine::keyLocked);
connect(&m_keyInfo, &KModifierKeyInfo::buttonPressed, this, &KeyStatesEngine::mouseButtonPressed);
connect(&m_keyInfo, &KModifierKeyInfo::keyAdded, this, &KeyStatesEngine::keyAdded);
connect(&m_keyInfo, &KModifierKeyInfo::keyRemoved, this, &KeyStatesEngine::keyRemoved);
}
Plasma::Service *KeyStatesEngine::serviceForSource(const QString &source)

Loading…
Cancel
Save