mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2];\r
} tinfl_huff_table;\r
\r
-#if MINIZ_HAS_64BIT_REGISTERS\r
+#if defined MINIZ_HAS_64BIT_REGISTERS && MINIZ_HAS_64BIT_REGISTERS\r
#define TINFL_USE_64BIT_BITBUF 1\r
#endif\r
\r
-#if TINFL_USE_64BIT_BITBUF\r
+#if defined TINFL_USE_64BIT_BITBUF && TINFL_USE_64BIT_BITBUF\r
typedef mz_uint64 tinfl_bit_buf_t;\r
#define TINFL_BITBUF_SIZE (64)\r
#else\r
PURPOSE "Required for audio notifications"
)
- find_package(LibsnoreQt5 QUIET)
+ find_package(LibsnoreQt5 0.5.70 QUIET)
set_package_properties(LibsnoreQt5 PROPERTIES TYPE OPTIONAL
- URL "https://github.com/TheOneRing/Snorenotify"
+ URL "https://projects.kde.org/projects/playground/libs/snorenotify"
DESCRIPTION "a cross-platform notification framework"
PURPOSE "Enable support for the snorenotify framework"
)
DESCRIPTION "a multimedia abstraction library"
PURPOSE "Required for audio notifications"
)
-
- find_package(Libsnore QUIET)
- set_package_properties(Libsnore PROPERTIES TYPE OPTIONAL
- URL "https://github.com/TheOneRing/Snorenotify"
- DESCRIPTION "a cross-platform notification framework"
- PURPOSE "Enable support for the snorenotify framework"
- )
endif(WITH_KDE)
find_package(IndicateQt QUIET)
currentIds += CoreAccountSettings().bufferViewOverlay();
QSet<int>::const_iterator iter;
- for (iter = currentIds.constBegin(); iter != currentIds.constEnd(); iter++) {
+ for (iter = currentIds.constBegin(); iter != currentIds.constEnd(); ++iter) {
addView(*iter);
}
}
else {
if (!config->isInitialized())
_uninitializedViewCount++;
- viewIter++;
+ ++viewIter;
}
}
if (Client::bufferViewManager()) {
BufferViewConfig *config = 0;
QSet<int>::const_iterator viewIter;
- for (viewIter = _bufferViewIds.constBegin(); viewIter != _bufferViewIds.constEnd(); viewIter++) {
+ for (viewIter = _bufferViewIds.constBegin(); viewIter != _bufferViewIds.constEnd(); ++viewIter) {
config = Client::bufferViewManager()->bufferViewConfig(*viewIter);
if (!config)
continue;
break;
}
else {
- netIter++;
+ ++netIter;
}
}
}
#include "clientsettings.h"
#include "peerfactory.h"
+#if QT_VERSION < 0x050000
+# include "../../3rdparty/sha512/sha512.h"
+#endif
+
using namespace Protocol;
ClientAuthHandler::ClientAuthHandler(CoreAccount account, QObject *parent)
}
s.setAccountValue("ShowNoCoreSslWarning", false);
s.setAccountValue("SslCert", QString());
+ s.setAccountValue("SslCertDigestVersion", QVariant(QVariant::Int));
}
if (_legacy)
onConnectionReady();
// That way, a warning will appear in case it becomes invalid at some point
CoreAccountSettings s;
s.setAccountValue("SSLCert", QString());
+ s.setAccountValue("SslCertDigestVersion", QVariant(QVariant::Int));
}
emit encrypted(true);
CoreAccountSettings s;
QByteArray knownDigest = s.accountValue("SslCert").toByteArray();
+ ClientAuthHandler::DigestVersion knownDigestVersion = static_cast<ClientAuthHandler::DigestVersion>(s.accountValue("SslCertDigestVersion").toInt());
+
+ QByteArray calculatedDigest;
+ switch (knownDigestVersion) {
+ case ClientAuthHandler::DigestVersion::Md5:
+ calculatedDigest = socket->peerCertificate().digest(QCryptographicHash::Md5);
+ break;
- if (knownDigest != socket->peerCertificate().digest()) {
+ case ClientAuthHandler::DigestVersion::Sha2_512:
+#if QT_VERSION >= 0x050000
+ calculatedDigest = socket->peerCertificate().digest(QCryptographicHash::Sha512);
+#else
+ calculatedDigest = sha2_512(socket->peerCertificate().toDer());
+#endif
+ break;
+
+ default:
+ qWarning() << "Certificate digest version" << QString(knownDigestVersion) << "is not supported";
+ }
+
+ if (knownDigest != calculatedDigest) {
bool accepted = false;
bool permanently = false;
emit handleSslErrors(socket, &accepted, &permanently);
return;
}
- if (permanently)
- s.setAccountValue("SslCert", socket->peerCertificate().digest());
- else
+ if (permanently) {
+#if QT_VERSION >= 0x050000
+ s.setAccountValue("SslCert", socket->peerCertificate().digest(QCryptographicHash::Sha512));
+#else
+ s.setAccountValue("SslCert", sha2_512(socket->peerCertificate().toDer()));
+#endif
+ s.setAccountValue("SslCertDigestVersion", ClientAuthHandler::DigestVersion::Latest);
+ }
+ else {
s.setAccountValue("SslCert", QString());
+ s.setAccountValue("SslCertDigestVersion", QVariant(QVariant::Int));
+ }
+ }
+ else if (knownDigestVersion != ClientAuthHandler::DigestVersion::Latest) {
+#if QT_VERSION >= 0x050000
+ s.setAccountValue("SslCert", socket->peerCertificate().digest(QCryptographicHash::Sha512));
+#else
+ s.setAccountValue("SslCert", sha2_512(socket->peerCertificate().toDer()));
+#endif
+ s.setAccountValue("SslCertDigestVersion", ClientAuthHandler::DigestVersion::Latest);
}
socket->ignoreSslErrors();
}
+#if QT_VERSION < 0x050000
+QByteArray ClientAuthHandler::sha2_512(const QByteArray &input) {
+ unsigned char output[64];
+ sha512((unsigned char*) input.constData(), input.size(), output, false);
+ // QByteArray::fromRawData() cannot be used here because that constructor
+ // does not copy "output" and the data is clobbered when the variable goes
+ // out of scope.
+ QByteArray result;
+ result.append((char*) output, 64);
+ return result;
+}
+#endif
+
#endif /* HAVE_SSL */
public:
ClientAuthHandler(CoreAccount account, QObject *parent = 0);
+ enum DigestVersion {
+ Md5,
+ Sha2_512,
+ Latest=Sha2_512
+ };
+
public slots:
void connectToCore();
void checkAndEnableSsl(bool coreSupportsSsl);
void startRegistration();
+#if QT_VERSION < 0x050000
+ QByteArray sha2_512(const QByteArray &input);
+#endif
+
private slots:
void onSocketConnected();
void onSocketStateChanged(QAbstractSocket::SocketState state);
QVariantList channelVar = iter->toList();
ChannelDescription channelDescription(channelVar[0].toString(), channelVar[1].toUInt(), channelVar[2].toString());
channelList << channelDescription;
- iter++;
+ ++iter;
}
emit channelListReceived(netId, channelFilters, channelList);
{
QSet<int> viewIds;
QVariantList variants = accountValue("BufferViewOverlay").toList();
- for (QVariantList::const_iterator iter = variants.constBegin(); iter != variants.constEnd(); iter++) {
+ for (QVariantList::const_iterator iter = variants.constBegin(); iter != variants.constEnd(); ++iter) {
viewIds << iter->toInt();
}
return viewIds;
if (state != _state) {
_state = state;
emit stateChanged(state);
+ if (state == Connected)
+ _wantReconnect = true;
if (state == Disconnected)
emit disconnected();
}
while (idIter != _validBuffers.constEnd()) {
if (Client::networkModel()->bufferType(*idIter) == BufferInfo::StatusBuffer)
return true;
- idIter++;
+ ++idIter;
}
}
QSet<BufferId>::const_iterator bufferIdIter = _validBuffers.constBegin();
while (bufferIdIter != _validBuffers.constEnd()) {
Client::messageModel()->requestBacklog(*bufferIdIter);
- bufferIdIter++;
+ ++bufferIdIter;
}
}
QList<Message>::const_iterator iter;
if (inOrder) {
iter = msglist.constEnd();
- iter--; // this op is safe as we've allready passed an empty check
+ --iter; // this op is safe as we've allready passed an empty check
}
else {
iter = msglist.constBegin();
}
if (!inOrder)
- iter++;
+ ++iter;
if (inOrder) {
while (iter != msglist.constBegin()) {
- iter--;
+ --iter;
if (!fastForward && (*iter).msgId() <= minId)
break;
dupeId = (*iter).msgId();
grouplist.prepend(*iter);
}
- iter++;
+ ++iter;
}
}
QHash<UserCategoryItem *, QList<IrcUser *> >::const_iterator catIter = categories.constBegin();
while (catIter != categories.constEnd()) {
catIter.key()->addUsers(catIter.value());
- catIter++;
+ ++catIter;
}
}
QString IrcUserItem::toolTip(int column) const
{
Q_UNUSED(column);
- QStringList toolTip(QString("<b>%1</b>").arg(nickName()));
- if (_ircUser->userModes() != "") toolTip[0].append(QString(" (%1)").arg(_ircUser->userModes()));
- if (_ircUser->isAway()) {
- toolTip[0].append(tr(" is away"));
- if (!_ircUser->awayMessage().isEmpty())
- toolTip[0].append(QString(" (%1)").arg(_ircUser->awayMessage()));
+ QString strTooltip;
+ QTextStream tooltip( &strTooltip, QIODevice::WriteOnly );
+ tooltip << "<qt><style>.bold { font-weight: bold; }</style>";
+
+ tooltip << "<p class='bold' align='center'>" << nickName();
+ if (_ircUser->userModes() != "") {
+ //TODO: Translate user Modes and add them to the table below
+ tooltip << " (" << _ircUser->userModes() << ")";
}
- if (!_ircUser->realName().isEmpty()) toolTip.append(_ircUser->realName());
- if (!_ircUser->ircOperator().isEmpty()) toolTip.append(QString("%1 %2").arg(nickName()).arg(_ircUser->ircOperator()));
- if (!_ircUser->suserHost().isEmpty()) toolTip.append(_ircUser->suserHost());
- if (!_ircUser->whoisServiceReply().isEmpty()) toolTip.append(_ircUser->whoisServiceReply());
+ tooltip << "</p>";
- toolTip.append(_ircUser->hostmask().remove(0, _ircUser->hostmask().indexOf("!")+1));
+ auto addRow = [&](const QString& key, const QString& value, bool condition = true) {
+ if (condition)
+ {
+ tooltip << "<tr><td class='bold' align='right'>" << key << "</td><td>" << value << "</td></tr>";
+ }
+ };
+
+ tooltip << "<table cellspacing='5' cellpadding='0'>";
+ if (_ircUser->isAway()) {
+ QString awayMessage(tr("(unknown)"));
+ if(!_ircUser->awayMessage().isEmpty()) {
+ awayMessage = _ircUser->awayMessage();
+ }
+ addRow(tr("Away Message"), awayMessage);
+ }
+ addRow(tr("Realname"), _ircUser->realName(), !_ircUser->realName().isEmpty());
+ addRow(tr("Operator"), _ircUser->ircOperator(), !_ircUser->ircOperator().isEmpty());
+ addRow(tr("Suser Host"), _ircUser->suserHost(),!_ircUser->suserHost().isEmpty());
+ addRow(tr("Whois Service Reply"), _ircUser->whoisServiceReply(), !_ircUser->whoisServiceReply().isEmpty());
+ addRow(tr("Hostmask"), _ircUser->hostmask().remove(0, _ircUser->hostmask().indexOf("!")+1));
+ addRow(tr("Operator"), _ircUser->ircOperator(), !_ircUser->ircOperator().isEmpty());
if (_ircUser->idleTime().isValid()) {
QDateTime now = QDateTime::currentDateTime();
QDateTime idle = _ircUser->idleTime();
int idleTime = idle.secsTo(now);
- toolTip.append(tr("idling since %1").arg(secondsToString(idleTime)));
+ addRow(tr("Idling since"), secondsToString(idleTime));
}
+
if (_ircUser->loginTime().isValid()) {
- toolTip.append(tr("login time: %1").arg(_ircUser->loginTime().toString()));
+ addRow(tr("Login time"), _ircUser->loginTime().toString());
}
- if (!_ircUser->server().isEmpty()) toolTip.append(tr("server: %1").arg(_ircUser->server()));
+ addRow(tr("Server"), _ircUser->server(), !_ircUser->server().isEmpty());
- return QString("<p> %1 </p>").arg(toolTip.join("<br />"));
+ tooltip << "</table></qt>";
+ return strTooltip;
}
iter = _selectionModels.erase(iter);
}
else {
- iter++;
+ ++iter;
}
}
}
QSet<QItemSelectionModel *>::iterator iter = _selectionModels.begin();
while (iter != _selectionModels.end()) {
(*iter)->setCurrentIndex(mapFromSource(current, (*iter)), QItemSelectionModel::Current);
- iter++;
+ ++iter;
}
_changeCurrentEnabled = true;
}
QSet<QItemSelectionModel *>::iterator iter = _selectionModels.begin();
while (iter != _selectionModels.end()) {
(*iter)->select(mapSelectionFromSource(currentSelection(), (*iter)), QItemSelectionModel::ClearAndSelect);
- iter++;
+ ++iter;
}
_changeSelectionEnabled = true;
}
child = *childIter;
child->setTreeItemFlags(0); // disable self deletion, as this would only fuck up consitency and the child gets deleted anyways
child->removeAllChilds();
- childIter++;
+ ++childIter;
}
emit beginRemoveChilds(0, numChilds - 1);
while (childIter != _childItems.constEnd()) {
child = *childIter;
qDebug() << "Row:" << child->row() << child << child->data(0, Qt::DisplayRole);
- childIter++;
+ ++childIter;
}
}
qDebug() << "==== End Of Childlist ====";
CliArgOption
};
- CliParserArg(const CliArgType type = CliArgInvalid, const char shortName = 0, const QString &help = QString(), const QString &valueName = QString(), const QString def = QString())
+ CliParserArg(const CliArgType type = CliArgInvalid, const char shortName = 0, const QString &help = QString(), const QString &valueName = QString(), const QString &def = QString())
: type(type)
, shortName(shortName)
, help(help)
BufferViewConfigHash::const_iterator iterEnd = _bufferViewConfigs.constEnd();
while (iter != iterEnd) {
bufferViewIds << (*iter)->bufferViewId();
- iter++;
+ ++iter;
}
return bufferViewIds;
}
QVariantList::const_iterator iterEnd = bufferViewIds.constEnd();
while (iter != iterEnd) {
newBufferViewConfig((*iter).value<int>());
- iter++;
+ ++iter;
}
}
else value = currentArg->toLocal8Bit();
name = currentArg->mid(1).toLatin1().at(0);
// we took one argument as argument to an option so skip it next time
- if (skipNext) currentArg++;
+ if (skipNext) ++currentArg;
if (!addShortArg(CliParserArg::CliArgOption, name, value)) return false;
}
}
{
bool isvalid = true;
if (mode.size() > 1) {
- qWarning() << "Channel" << name() << "received Channel User Mode which is longer then 1 Char:" << mode;
+ qWarning() << "Channel" << name() << "received Channel User Mode which is longer than 1 Char:" << mode;
isvalid = false;
}
return isvalid;
}
_userModes[ircuser] = modes[i];
- ircuser->joinChannel(this);
+ ircuser->joinChannel(this, true);
connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickSet(QString)));
// connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed()));
- // if you wonder why there is no counterpart to ircUserJoined:
- // the joines are propagted by the ircuser. the signal ircUserJoined is only for convenience
+ // If you wonder why there is no counterpart to ircUserJoined:
+ // the joins are propagated by the ircuser. The signal ircUserJoined is only for convenience
newNicks << ircuser->nick();
newModes << modes[i];
if (isKnownUser(ircuser)) {
_userModes.remove(ircuser);
ircuser->partChannel(this);
- // if you wonder why there is no counterpart to ircUserParted:
- // the joines are propagted by the ircuser. the signal ircUserParted is only for convenience
+ // If you wonder why there is no counterpart to ircUserParted:
+ // the joins are propagted by the ircuser. The signal ircUserParted is only for convenience
disconnect(ircuser, 0, this, 0);
emit ircUserParted(ircuser);
QHash<IrcUser *, QString>::const_iterator iter = _userModes.constBegin();
while (iter != _userModes.constEnd()) {
usermodes[iter.key()->nick()] = iter.value();
- iter++;
+ ++iter;
}
return usermodes;
}
while (iter != usermodes.constEnd()) {
users << network()->newIrcUser(iter.key());
modes << iter.value().toString();
- iter++;
+ ++iter;
}
joinIrcUsers(users, modes);
}
QHash<QChar, QStringList>::const_iterator A_iter = _A_channelModes.constBegin();
while (A_iter != _A_channelModes.constEnd()) {
A_modes[A_iter.key()] = A_iter.value();
- A_iter++;
+ ++A_iter;
}
channelModes["A"] = A_modes;
QHash<QChar, QString>::const_iterator B_iter = _B_channelModes.constBegin();
while (B_iter != _B_channelModes.constEnd()) {
B_modes[B_iter.key()] = B_iter.value();
- B_iter++;
+ ++B_iter;
}
channelModes["B"] = B_modes;
QHash<QChar, QString>::const_iterator C_iter = _C_channelModes.constBegin();
while (C_iter != _C_channelModes.constEnd()) {
C_modes[C_iter.key()] = C_iter.value();
- C_iter++;
+ ++C_iter;
}
channelModes["C"] = C_modes;
QSet<QChar>::const_iterator D_iter = _D_channelModes.constBegin();
while (D_iter != _D_channelModes.constEnd()) {
D_modes += *D_iter;
- D_iter++;
+ ++D_iter;
}
channelModes["D"] = D_modes;
QVariantMap::const_iterator iterEnd = channelModes["A"].toMap().constEnd();
while (iter != iterEnd) {
_A_channelModes[iter.key()[0]] = iter.value().toStringList();
- iter++;
+ ++iter;
}
iter = channelModes["B"].toMap().constBegin();
iterEnd = channelModes["B"].toMap().constEnd();
while (iter != iterEnd) {
_B_channelModes[iter.key()[0]] = iter.value().toString();
- iter++;
+ ++iter;
}
iter = channelModes["C"].toMap().constBegin();
iterEnd = channelModes["C"].toMap().constEnd();
while (iter != iterEnd) {
_C_channelModes[iter.key()[0]] = iter.value().toString();
- iter++;
+ ++iter;
}
QString D_modes = channelModes["D"].toString();
* C --> set value or remove
* D --> on/off
*
- * B and C behave very similar... we store the data in different datastructes
+ * B and C behave very similar... we store the data in different datastructures
* for future compatibility
******************************************************************************/
QSet<QChar>::const_iterator D_iter = _D_channelModes.constBegin();
while (D_iter != _D_channelModes.constEnd()) {
modeString += *D_iter;
- D_iter++;
+ ++D_iter;
}
QHash<QChar, QString>::const_iterator BC_iter = _C_channelModes.constBegin();
while (BC_iter != _C_channelModes.constEnd()) {
modeString += BC_iter.key();
params << BC_iter.value();
- BC_iter++;
+ ++BC_iter;
}
BC_iter = _B_channelModes.constBegin();
while (BC_iter != _B_channelModes.constEnd()) {
modeString += BC_iter.key();
params << BC_iter.value();
- BC_iter++;
+ ++BC_iter;
}
if (modeString.isEmpty())
return modeString;
}
-void IrcUser::joinChannel(IrcChannel *channel)
+void IrcUser::joinChannel(IrcChannel *channel, bool skip_channel_join)
{
Q_ASSERT(channel);
if (!_channels.contains(channel)) {
_channels.insert(channel);
- channel->joinIrcUser(this);
+ if (!skip_channel_join)
+ channel->joinIrcUser(this);
}
}
void setUserModes(const QString &modes);
- void joinChannel(IrcChannel *channel);
+ /*!
+ * \brief joinChannel Called when user joins some channel, this function inserts the channel to internal list of channels this user is in.
+ * \param channel Pointer to a channel this user just joined
+ * \param skip_channel_join If this is false, this function will also call IrcChannel::joinIrcUser, can be set to true as a performance tweak.
+ */
+ void joinChannel(IrcChannel *channel, bool skip_channel_join = false);
void joinChannel(const QString &channelname);
void partChannel(IrcChannel *channel);
void partChannel(const QString &channelname);
break;
}
else {
- slotIter++;
+ ++slotIter;
}
}
}
objIter = classIter->erase(objIter);
obj->stopSynchronize(this);
}
- classIter++;
+ ++classIter;
}
_syncSlave.clear();
slotIter = _attachedSlots.erase(slotIter);
}
else
- slotIter++;
+ ++slotIter;
}
}
classIter->remove(obj->objectName());
break;
}
- classIter++;
+ ++classIter;
}
obj->stopSynchronize(this);
}
while (iterator != properties.constEnd()) {
propName = iterator.key();
if (propName == "objectName") {
- iterator++;
+ ++iterator;
continue;
}
else
setProperty(propName.toLatin1(), iterator.value());
// qDebug() << "<<< SYNC:" << name << iterator.value();
- iterator++;
+ ++iterator;
}
}
virtual bool isInitialized() const;
- virtual const QMetaObject *syncMetaObject() const { return metaObject(); };
+ virtual const QMetaObject *syncMetaObject() const { return metaObject(); }
inline void setAllowClientUpdates(bool allow) { _allowClientUpdates = allow; }
inline bool allowClientUpdates() const { return _allowClientUpdates; }
{
// disconnect the connections, so their deletion is no longer interessting for us
QHash<QThread *, Connection *>::iterator conIter;
- for (conIter = _connectionPool.begin(); conIter != _connectionPool.end(); conIter++) {
+ for (conIter = _connectionPool.begin(); conIter != _connectionPool.end(); ++conIter) {
QSqlDatabase::removeDatabase(conIter.value()->name());
disconnect(conIter.value(), 0, this, 0);
}
QVariantMap boundValues = query.boundValues();
QStringList valueStrings;
QVariantMap::const_iterator iter;
- for (iter = boundValues.constBegin(); iter != boundValues.constEnd(); iter++) {
+ for (iter = boundValues.constBegin(); iter != boundValues.constEnd(); ++iter) {
QString value;
QSqlField field;
if (query.driver()) {
useSsl = _connectionFeatures & Protocol::Encryption;
if (Quassel::isOptionSet("require-ssl") && !useSsl && !_peer->isLocal()) {
+ quInfo() << qPrintable(tr("SSL required but non-SSL connection attempt from %1").arg(socket()->peerAddress().toString()));
_peer->dispatch(ClientDenied(tr("<b>SSL is required!</b><br>You need to use SSL in order to connect to this core.")));
_peer->close();
return;
UserId uid = Core::validateUser(msg.user, msg.password);
if (uid == 0) {
+ quInfo() << qPrintable(tr("Invalid login attempt from %1 as \"%2\"").arg(socket()->peerAddress().toString(), msg.user));
_peer->dispatch(LoginFailed(tr("<b>Invalid username or password!</b><br>The username/password combination you supplied could not be found in the database.")));
return;
}
QList<Message>::const_iterator msgListEnd = msgList.constEnd();
while (msgIter != msgListEnd) {
backlog << qVariantFromValue(*msgIter);
- msgIter++;
+ ++msgIter;
}
if (additional && limit != 0) {
msgListEnd = msgList.constEnd();
while (msgIter != msgListEnd) {
backlog << qVariantFromValue(*msgIter);
- msgIter++;
+ ++msgIter;
}
}
}
QList<Message>::const_iterator msgListEnd = msgList.constEnd();
while (msgIter != msgListEnd) {
backlog << qVariantFromValue(*msgIter);
- msgIter++;
+ ++msgIter;
}
if (additional) {
msgListEnd = msgList.constEnd();
while (msgIter != msgListEnd) {
backlog << qVariantFromValue(*msgIter);
- msgIter++;
+ ++msgIter;
}
}
while (iter != iterEnd) {
config = new CoreBufferViewConfig(iter.key().toInt(), iter.value().toMap(), this);
addBufferViewConfig(config);
- iter++;
+ ++iter;
}
}
BufferViewConfigHash::const_iterator iterEnd = bufferViewConfigHash().constEnd();
while (iter != iterEnd) {
views[QString::number((*iter)->bufferViewId())] = (*iter)->toVariantMap();
- iter++;
+ ++iter;
}
Core::setUserSetting(_coreSession->user(), "BufferViews", views);
if ((*iter)->bufferViewId() > maxId)
maxId = (*iter)->bufferViewId();
- iter++;
+ ++iter;
}
maxId++;
QVariantList::const_iterator iterEnd = properties.constEnd();
while (iter != iterEnd) {
requestCreateBufferView((*iter).toMap());
- iter++;
+ ++iter;
}
}
{
#ifdef HAVE_QCA2
_cipher = 0;
+
+ // Get the cipher key from CoreNetwork if present
+ CoreNetwork *coreNetwork = qobject_cast<CoreNetwork *>(network);
+ if (coreNetwork) {
+ QByteArray key = coreNetwork->readChannelCipherKey(channelname);
+ if (!key.isEmpty()) {
+ setEncrypted(cipher()->setKey(key));
+ }
+ }
#endif
}
CoreIrcChannel::~CoreIrcChannel()
{
#ifdef HAVE_QCA2
+ // Store the cipher key in CoreNetwork, including empty keys if a cipher
+ // exists. There is no need to store the empty key if no cipher exists; no
+ // key was present when instantiating and no key was set during the
+ // channel's lifetime.
+ CoreNetwork *coreNetwork = qobject_cast<CoreNetwork *>(network());
+ if (coreNetwork && _cipher) {
+ coreNetwork->storeChannelCipherKey(name(), _cipher->key());
+ }
+
delete _cipher;
#endif
}
connect(&_tokenBucketTimer, SIGNAL(timeout()), this, SLOT(fillBucketAndProcessQueue()));
connect(&socket, SIGNAL(connected()), this, SLOT(socketInitialized()));
- connect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
connect(&socket, SIGNAL(readyRead()), this, SLOT(socketHasData()));
switch (socketState) {
case QAbstractSocket::UnconnectedState:
state = Network::Disconnected;
+ socketDisconnected();
break;
case QAbstractSocket::HostLookupState:
case QAbstractSocket::ConnectingState:
inline QString channelKey(const QString &channel) const { return _channelKeys.value(channel.toLower(), QString()); }
+ inline QByteArray readChannelCipherKey(const QString &channel) const { return _cipherKeys.value(channel.toLower()); }
+ inline void storeChannelCipherKey(const QString &channel, const QByteArray &key) { _cipherKeys[channel.toLower()] = key; }
+
inline bool isAutoWhoInProgress(const QString &channel) const { return _autoWhoPending.value(channel.toLower(), 0); }
inline UserId userId() const { return _coreSession->user(); }
QList<QByteArray> _msgQueue;
QString _requestedUserModes; // 2 strings separated by a '-' character. first part are requested modes to add, the second to remove
+
+ // List of blowfish keys for channels
+ QHash<QString, QByteArray> _cipherKeys;
};
networkIter = networkInfos.erase(networkIter);
}
else {
- networkIter++;
+ ++networkIter;
}
}
s.removeIdentity(id);
messageIter = _messageQueue.erase(messageIter);
}
else {
- messageIter++;
+ ++messageIter;
}
}
// remove buffers from syncer
IrcUser *me = 0;
while (netIter != _networks.end()) {
net = *netIter;
- netIter++;
+ ++netIter;
if (!net->isConnected())
continue;
QString awayReason;
while (netIter != _networks.end()) {
net = *netIter;
- netIter++;
+ ++netIter;
if (!net->isConnected())
continue;
CoreNetwork *net = 0;
while (netIter != _networks.end()) {
net = *netIter;
- netIter++;
+ ++netIter;
if (!net->isConnected())
continue;
QHash<QByteArray, QByteArray>::const_iterator quoteIter = quoteHash.constBegin();
while (quoteIter != quoteHash.constEnd()) {
quotedMessage.replace(quoteIter.value(), quoteIter.key());
- quoteIter++;
+ ++quoteIter;
}
return quotedMessage;
}
QHash<QByteArray, QByteArray>::const_iterator quoteIter = _ctcpXDelimDequoteHash.constBegin();
while (quoteIter != _ctcpXDelimDequoteHash.constEnd()) {
quotedMessage.replace(quoteIter.value(), quoteIter.key());
- quoteIter++;
+ ++quoteIter;
}
return quotedMessage;
}
if (dequotedMessage.count(XDELIM) != 2 || dequotedMessage[0] != '\001' || dequotedMessage[dequotedMessage.count() -1] != '\001') {
displayMsg(e, messagetype, targetDecode(e, dequotedMessage), e->prefix(), e->target(), flags);
} else {
- int spacePos = -1;
+ int spacePos;
QString ctcpcmd, ctcpparam;
QByteArray ctcp = xdelimDequote(dequotedMessage.mid(1, dequotedMessage.count() - 2));
<< Sequence("quasseluser", "userid")
<< Sequence("sender", "senderid");
QList<Sequence>::const_iterator iter;
- for (iter = sequences.constBegin(); iter != sequences.constEnd(); iter++) {
+ for (iter = sequences.constBegin(); iter != sequences.constEnd(); ++iter) {
resetQuery();
newQuery(QString("SELECT setval('%1_%2_seq', max(%2)) FROM %1").arg(iter->table, iter->field), db);
if (!exec())
list(APPEND LIBS KF5::ConfigWidgets KF5::Notifications KF5::NotifyConfig KF5::WidgetsAddons KF5::XmlGui)
endif()
-if (LIBSNORE_FOUND)
+if (LibsnoreQt5_FOUND)
add_definitions(-DHAVE_LIBSNORE)
- include_directories(${LIBSNORE_INCLUDE_DIRS})
list(APPEND SOURCES snorenotificationbackend.cpp)
list(APPEND FORMS snorentificationconfigwidget.ui)
- list(APPEND LIBS ${LIBSNORE_LIBRARIES})
+ list(APPEND LIBS Snore::Libsnore)
endif()
if (PHONON_FOUND OR Phonon4Qt5_FOUND)
QPointF senderPos(firstColumnHandle()->sceneRight(), 0);
while (lineIter != lineIterBegin) {
- lineIter--;
+ --lineIter;
(*lineIter)->setFirstColumn(timestampWidth, senderWidth, senderPos);
}
//setItemIndexMethod(QGraphicsScene::BspTreeIndex);
qreal contentsWidth = _sceneRect.width() - secondColumnHandle()->sceneRight();
QPointF contentsPos(secondColumnHandle()->sceneRight(), 0);
while (lineIter != lineIterBegin) {
- lineIter--;
+ --lineIter;
(*lineIter)->setSecondColumn(senderWidth, contentsWidth, contentsPos, linePos);
}
//setItemIndexMethod(QGraphicsScene::BspTreeIndex);
if (_dock->isValid()) {
_bus.connect("org.freedesktop.DockManager", "/org/freedesktop/DockManager", "org.freedesktop.DockManager", "ItemAdded", this, SLOT(itemAdded(QDBusObjectPath)));
} else {
- qDebug() << "No DockManager available";
- _enabled = false;
+ _available = _enabled = false;
return;
}
}
+ _available = true;
itemAdded(QDBusObjectPath());
SettingsPage *DockManagerNotificationBackend::createConfigWidget() const
{
- return new ConfigWidget();
+ return new ConfigWidget(_available);
}
/***************************************************************************/
-DockManagerNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent)
+DockManagerNotificationBackend::ConfigWidget::ConfigWidget(bool enabled, QWidget *parent)
: SettingsPage("Internal", "DockManagerNotification", parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(enabledBox = new QCheckBox(tr("Mark dockmanager entry"), this));
- enabledBox->setEnabled(true);
+ enabledBox->setEnabled(enabled);
connect(enabledBox, SIGNAL(toggled(bool)), SLOT(widgetChanged()));
}
private:
class ConfigWidget;
bool _enabled;
+ bool _available;
QDBusConnection _bus;
QDBusInterface *_dock;
QDBusInterface *_item;
Q_OBJECT
public:
- ConfigWidget(QWidget *parent = 0);
+ ConfigWidget(bool enabled, QWidget *parent = 0);
void save();
void load();
# ifdef HAVE_PHONON
# include "phononnotificationbackend.h"
# endif
-# ifdef HAVE_LIBSNORE
-# include "snorenotificationbackend.h"
-# endif
# include "systraynotificationbackend.h"
# include "taskbarnotificationbackend.h"
#else /* HAVE_KDE */
# include "knotificationbackend.h"
#endif /* HAVE_KDE */
+
+#ifdef HAVE_LIBSNORE
+# include "snorenotificationbackend.h"
+#endif
+
#ifdef HAVE_SSL
# include "sslinfodlg.h"
#endif
# ifdef HAVE_PHONON
QtUi::registerNotificationBackend(new PhononNotificationBackend(this));
# endif
-# ifdef HAVE_LIBSNORE
- QtUi::registerNotificationBackend(new SnoreNotificationBackend(this));
-# elif !defined(QT_NO_SYSTEMTRAYICON)
- QtUi::registerNotificationBackend(new SystrayNotificationBackend(this));
-# endif
-
QtUi::registerNotificationBackend(new TaskbarNotificationBackend(this));
-
#else /* HAVE_KDE */
QtUi::registerNotificationBackend(new KNotificationBackend(this));
#endif /* HAVE_KDE */
+
+#ifdef HAVE_LIBSNORE
+ QtUi::registerNotificationBackend(new SnoreNotificationBackend(this));
+#elif !defined(QT_NO_SYSTEMTRAYICON) && !defined(HAVE_KDE)
+ QtUi::registerNotificationBackend(new SystrayNotificationBackend(this));
+#endif
+
#ifdef HAVE_INDICATEQT
QtUi::registerNotificationBackend(new IndicatorNotificationBackend(this));
#endif
while (msgIter != msgIterEnd) {
checkForHighlight(*msgIter);
preProcess(*msgIter);
- msgIter++;
+ ++msgIter;
}
Client::messageModel()->insertMessages(msgs);
return;
rule["CS"].toBool() ? Qt::CaseSensitive : Qt::CaseInsensitive,
rule["RegEx"].toBool(),
rule["Channel"].toString());
- iter++;
+ ++iter;
}
}
break;
}
else {
- iter++;
+ ++iter;
}
}
delete config;
}
else {
changed = true;
- iter++;
+ ++iter;
}
}
return changed;
_editSsl = true;
QHash<IdentityId, CertIdentity *>::iterator idIter;
- for (idIter = identities.begin(); idIter != identities.end(); idIter++) {
+ for (idIter = identities.begin(); idIter != identities.end(); ++idIter) {
idIter.value()->enableEditSsl();
}
#include <QtGui>
#include <QtGlobal>
+#include <QMetaObject>
#include "client.h"
#include "networkmodel.h"
#include <iostream>
-#include <snore/core/snore.h>
-#include <snore/core/notification/notification.h>
+#include <libsnore/snore.h>
+#include <libsnore/notification/notification.h>
SnoreNotificationBackend::SnoreNotificationBackend (QObject *parent)
: AbstractNotificationBackend(parent),
- m_systrayBackend(NULL)
+ m_icon(QIcon::fromTheme("quassel", QIcon(":/icons/quassel.png")))
{
- NotificationSettings notificationSettings;
- QString backend = notificationSettings.value("Snore/Backend", "Default").toString();
- m_timeout = notificationSettings.value("Snore/Timeout", 10).toInt();
-
- notificationSettings.notify("Snore/Backend", this, SLOT(backendChanged(const QVariant &)));
- notificationSettings.notify("Snore/Timeout", this, SLOT(timeoutChanged(const QVariant &)));
- //TODO: try to get an instance of the tray icon to be able to show popups
- m_snore = new Snore::SnoreCore();
- m_snore->loadPlugins(Snore::SnorePlugin::BACKEND);
- m_icon = Snore::Icon(QIcon::fromTheme("quassel", QIcon(":/icons/quassel.png")).pixmap(48).toImage());
+ Snore::SnoreCore::instance().loadPlugins(
+#ifndef HAVE_KDE
+ Snore::SnorePlugin::BACKEND |
+#endif
+ Snore::SnorePlugin::SECONDARY_BACKEND);
m_application = Snore::Application("Quassel", m_icon);
- m_application.hints().setValue("WINDOWS_APP_ID","QuasselProject.QuasselIRC");
+ m_application.hints().setValue("windows-app-id","QuasselProject.QuasselIRC");
+ m_application.hints().setValue("pushover-token", "arNtsi983QSZUqU3KAZrFLKHGFPkdL");
- connect(m_snore, SIGNAL(actionInvoked(Snore::Notification)), this, SLOT(actionInvoked(Snore::Notification)));
+ connect(&Snore::SnoreCore::instance(), SIGNAL(actionInvoked(Snore::Notification)), this, SLOT(actionInvoked(Snore::Notification)));
m_alert = Snore::Alert(tr("Private Message"), m_icon);
m_application.addAlert(m_alert);
+ Snore::SnoreCore::instance().setDefaultApplication(m_application);
- m_snore->registerApplication(m_application);
-
- backendChanged(QVariant::fromValue(backend));
-
-
+ NotificationSettings notificationSettings;
+ bool enabled = notificationSettings.value("Snore/Enabled", false).toBool();
+ setTraybackend(enabled);
+ notificationSettings.notify("Snore/Enabled", this, SLOT(setTraybackend(const QVariant &)));
}
SnoreNotificationBackend::~SnoreNotificationBackend()
{
- m_snore->deregisterApplication(m_application);
- m_snore->deleteLater();
-}
-
-void SnoreNotificationBackend::backendChanged(const QVariant &v)
-{
- QString backend = v.toString();
- if (backend != "Default") {
- if (setSnoreBackend(backend)) {
- return;
- }
- }
- setTraybackend();
-}
-
-void SnoreNotificationBackend::timeoutChanged(const QVariant &v)
-{
- m_timeout = v.toInt();
+ Snore::SnoreCore::instance().deregisterApplication(m_application);
}
void SnoreNotificationBackend::notify(const Notification &n)
{
- if (m_systrayBackend != NULL) {
+#ifndef HAVE_KDE
+ if (m_systrayBackend != nullptr) {
return;
}
- QString title = Client::networkModel()->networkName(n.bufferId) + " - " + Client::networkModel()->bufferName(n.bufferId);
+#endif
+ QString title = QString("%1 - %2").arg(Client::networkModel()->networkName(n.bufferId), Client::networkModel()->bufferName(n.bufferId));
QString message = QString("<%1> %2").arg(n.sender, n.message);
- Snore::Notification noti(m_application, m_alert, title, message, m_icon, m_timeout);
+ Snore::Notification noti(m_application, m_alert, title, message, m_icon);
noti.hints().setValue("QUASSEL_ID", n.notificationId);
m_notificationIds.insert(n.notificationId, noti.id());
- m_snore->broadcastNotification(noti);
+ Snore::SnoreCore::instance().broadcastNotification(noti);
}
void SnoreNotificationBackend::close(uint notificationId)
{
- if (m_systrayBackend != NULL) {
+#ifndef HAVE_KDE
+ if (m_systrayBackend != nullptr) {
return;
}
- Snore::Notification n = m_snore->getActiveNotificationByID(m_notificationIds.take(notificationId));
- m_snore->requestCloseNotification(n, Snore::Notification::CLOSED);
+#endif
+ Snore::Notification n = Snore::SnoreCore::instance().getActiveNotificationByID(m_notificationIds.take(notificationId));
+ Snore::SnoreCore::instance().requestCloseNotification(n, Snore::Notification::CLOSED);
}
void SnoreNotificationBackend::actionInvoked(Snore::Notification n)
SettingsPage *SnoreNotificationBackend::createConfigWidget()const
{
- return new ConfigWidget(m_snore);
+ return new ConfigWidget();
}
-void SnoreNotificationBackend::setTraybackend()
-{
- if (m_systrayBackend == NULL) {
- m_systrayBackend = new SystrayNotificationBackend(this);
- QtUi::registerNotificationBackend(m_systrayBackend);
- }
-}
-bool SnoreNotificationBackend::setSnoreBackend(const QString &backend)
+void SnoreNotificationBackend::setTraybackend(const QVariant &b)
{
- if (m_systrayBackend != NULL) {
- QtUi::unregisterNotificationBackend(m_systrayBackend);
- delete m_systrayBackend;
- m_systrayBackend = NULL;
+#ifndef HAVE_KDE
+ if (!b.toBool()) {
+ if (m_systrayBackend == nullptr) {
+ m_systrayBackend = new SystrayNotificationBackend(this);
+ QtUi::registerNotificationBackend(m_systrayBackend);
+ }
+ } else {
+ if (m_systrayBackend != nullptr) {
+ QtUi::unregisterNotificationBackend(m_systrayBackend);
+ m_systrayBackend->deleteLater();
+ m_systrayBackend = nullptr;
+ }
+ }
+#endif
+ if (b.toBool()) {
+ Snore::SnoreCore::instance().registerApplication(m_application);
+ } else {
+ Snore::SnoreCore::instance().deregisterApplication(m_application);
}
- return m_snore->setPrimaryNotificationBackend(backend);
}
-
-
-
/***************************************************************************/
-SnoreNotificationBackend::ConfigWidget::ConfigWidget(Snore::SnoreCore *snore, QWidget *parent)
- :SettingsPage("Internal", "SnoreNotification", parent),
- m_snore(snore)
+SnoreNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent)
+ :SettingsPage("Internal", "SnoreNotification", parent)
{
ui.setupUi(this);
- QStringList backends = m_snore->notificationBackends();
- backends.append("Default");
- qSort(backends);
- ui.backends->insertItems(0, backends);
-
- connect(ui.backends, SIGNAL(currentIndexChanged(QString)), SLOT(backendChanged(QString)));
- connect(ui.timeout, SIGNAL(valueChanged(int)), this, SLOT(timeoutChanged(int)));
-}
-
-void SnoreNotificationBackend::ConfigWidget::backendChanged(const QString &b)
-{
- ui.backends->setCurrentIndex(ui.backends->findText(b));
- setChangedState(true);
-}
-
-void SnoreNotificationBackend::ConfigWidget::timeoutChanged(int i)
-{
- ui.timeout->setValue(i);
- setChangedState(true);
-
+ connect(ui.useSnoreCheckBox, SIGNAL(toggled(bool)), this, SLOT(useSnnoreChanged(bool)));
}
bool SnoreNotificationBackend::ConfigWidget::hasDefaults() const
void SnoreNotificationBackend::ConfigWidget::defaults()
{
- backendChanged("Default");
- timeoutChanged(10);
+ useSnnoreChanged(false);
+ ui.widget->reset();
}
void SnoreNotificationBackend::ConfigWidget::load()
{
NotificationSettings s;
- QString backend = s.value("Snore/Backend", "Default").toString();
- int timeout = s.value("Snore/Timeout", 10).toInt();
- ui.backends->setCurrentIndex(ui.backends->findText(backend));
- ui.timeout->setValue(timeout);
+ bool enabled = s.value("Snore/Enabled", false).toBool();
+ ui.useSnoreCheckBox->setChecked(enabled);
+ ui.widget->setEnabled(enabled);
setChangedState(false);
+ QMetaObject::invokeMethod(this, "changed", Qt::QueuedConnection);//hack to make apply and accept button work for snore settings widget
}
void SnoreNotificationBackend::ConfigWidget::save()
{
NotificationSettings s;
- s.setValue("Snore/Backend", ui.backends->currentText());
- s.setValue("Snore/Timeout", ui.timeout->value());
+ s.setValue("Snore/Enabled", ui.useSnoreCheckBox->isChecked());
+ ui.widget->accept();
load();
}
+
+void SnoreNotificationBackend::ConfigWidget::useSnnoreChanged(bool b)
+{
+ ui.useSnoreCheckBox->setChecked(b);
+ ui.widget->setEnabled(b);
+ setChangedState(true);
+}
+
+
#include "ui_snorentificationconfigwidget.h"
-#include <snore/core/snore.h>
-#include <snore/core/notification/notification.h>
+#include <libsnore/snore.h>
+#include <libsnore/notification/notification.h>
class SystrayNotificationBackend;
void notify(const Notification &);
void close(uint notificationId);
- virtual SettingsPage *createConfigWidget()const;
+ virtual SettingsPage *createConfigWidget() const;
signals:
void activated(uint notificationId = 0);
public slots:
void actionInvoked(Snore::Notification);
+
private slots:
- void backendChanged(const QVariant &);
- void timeoutChanged(const QVariant &);
+ void setTraybackend(const QVariant &b);
private:
- void setTraybackend();
- bool setSnoreBackend(const QString &backend);
class ConfigWidget;
- SystrayNotificationBackend * m_systrayBackend;
- Snore::SnoreCore *m_snore;
+#ifndef HAVE_KDE
+ SystrayNotificationBackend * m_systrayBackend = nullptr;
+#endif
QHash<uint, uint> m_notificationIds;
Snore::Icon m_icon;
Snore::Application m_application;
Snore::Alert m_alert;
- int m_timeout;
};
class SnoreNotificationBackend::ConfigWidget : public SettingsPage {
Q_OBJECT
public:
- ConfigWidget(Snore::SnoreCore *snore, QWidget *parent = 0);
- void save();
- void load();
+ ConfigWidget(QWidget *parent = 0);
+
bool hasDefaults() const;
void defaults();
-
+ void load();
+ void save();
private slots:
- void backendChanged(const QString&);
- void timeoutChanged(int);
+ void useSnnoreChanged(bool);
private:
Ui::SnoreNotificationConfigWidget ui;
- Snore::SnoreCore *m_snore;
-
- // QSpinBox *timeoutBox;
-
- // bool enabled;
- // int timeout;
};
#endif
<property name="title">
<string>Snore</string>
</property>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>25</y>
- <width>46</width>
- <height>13</height>
- </rect>
- </property>
- <property name="text">
- <string>Backend:</string>
- </property>
- </widget>
- <widget class="QComboBox" name="backends">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>20</y>
- <width>331</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="label_2">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>65</y>
- <width>46</width>
- <height>13</height>
- </rect>
- </property>
- <property name="text">
- <string>Timeout:</string>
- </property>
- </widget>
- <widget class="QSpinBox" name="timeout">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>60</y>
- <width>81</width>
- <height>22</height>
- </rect>
- </property>
- <property name="specialValueText">
- <string/>
- </property>
- <property name="suffix">
- <string> s</string>
- </property>
- <property name="minimum">
- <number>0</number>
- </property>
- </widget>
- <widget class="QLabel" name="label_3">
- <property name="geometry">
- <rect>
- <x>170</x>
- <y>65</y>
- <width>101</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>0 means infinite</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="Snore::SettingsDialog" name="widget" native="true"/>
+ </item>
+ <item>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="useSnoreLabel">
+ <property name="text">
+ <string>Enable Snore</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="useSnoreCheckBox"/>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>Snore::SettingsDialog</class>
+ <extends>QWidget</extends>
+ <header location="global">libsnore/settingsdialog.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>
if (enable == false) {
addBuffers(QList<BufferId>::fromSet(_toAdd));
QSet<BufferId>::const_iterator iter;
- for (iter = _toTempRemove.constBegin(); iter != _toTempRemove.constEnd(); iter++) {
+ for (iter = _toTempRemove.constBegin(); iter != _toTempRemove.constEnd(); ++iter) {
if (config()->temporarilyRemovedBuffers().contains(*iter))
continue;
config()->requestRemoveBuffer(*iter);
}
- for (iter = _toRemove.constBegin(); iter != _toRemove.constEnd(); iter++) {
+ for (iter = _toRemove.constBegin(); iter != _toRemove.constEnd(); ++iter) {
if (config()->removedBuffers().contains(*iter))
continue;
config()->requestRemoveBufferPermanently(*iter);
ignoreMenu->addAction(act);
}
counter++;
- ruleIter++;
+ ++ruleIter;
}
if (counter)
ignoreMenu->addSeparator();