summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ebf2a8f)
In GCC 4.3 there are further cases that are suggested to be given
parentheses, to make sure that the result is the actuall behaviour
looked for.
Fix the cases so that warnings are not reported for these.
Signed-off-by: Manuel Nickschas <sputnick@quassel-irc.org>
void Buffer::setLastSeenMsg(const MsgId &msgId) {
// qDebug() << "want to set lastSeen:" << bufferInfo() << seen << lastSeen();
const MsgId oldLastSeen = lastSeenMsg();
void Buffer::setLastSeenMsg(const MsgId &msgId) {
// qDebug() << "want to set lastSeen:" << bufferInfo() << seen << lastSeen();
const MsgId oldLastSeen = lastSeenMsg();
- if(!oldLastSeen.isValid() || msgId.isValid() && msgId > oldLastSeen) {
+ if(!oldLastSeen.isValid() || (msgId.isValid() && msgId > oldLastSeen)) {
//qDebug() << "setting:" << bufferInfo().bufferName() << seen;
_lastSeenMsg = msgId;
Client::setBufferLastSeenMsg(bufferInfo().bufferId(), msgId);
//qDebug() << "setting:" << bufferInfo().bufferName() << seen;
_lastSeenMsg = msgId;
Client::setBufferLastSeenMsg(bufferInfo().bufferId(), msgId);
void ClientSyncer::clientInitAck(const QVariantMap &msg) {
// Core has accepted our version info and sent its own. Let's see if we accept it as well...
void ClientSyncer::clientInitAck(const QVariantMap &msg) {
// Core has accepted our version info and sent its own. Let's see if we accept it as well...
- if(msg.contains("CoreBuild") && msg["CoreBuild"].toUInt() < 732 // legacy!
- || !msg.contains("CoreBuild") && msg["ProtocolVersion"].toUInt() < Global::clientNeedsProtocol) {
+ if((msg.contains("CoreBuild") && msg["CoreBuild"].toUInt() < 732) // legacy!
+ || (!msg.contains("CoreBuild") && msg["ProtocolVersion"].toUInt() < Global::clientNeedsProtocol)) {
emit connectionError(tr("<b>The Quassel Core you are trying to connect to is too old!</b><br>"
"Need at least core/client protocol v%1 to connect.").arg(Global::clientNeedsProtocol));
disconnectFromCore();
emit connectionError(tr("<b>The Quassel Core you are trying to connect to is too old!</b><br>"
"Need at least core/client protocol v%1 to connect.").arg(Global::clientNeedsProtocol));
disconnectFromCore();
UserCategoryItem *categoryItem = 0;
for(int i = 0; i < childCount(); i++) {
categoryItem = qobject_cast<UserCategoryItem *>(child(i));
UserCategoryItem *categoryItem = 0;
for(int i = 0; i < childCount(); i++) {
categoryItem = qobject_cast<UserCategoryItem *>(child(i));
- if(success = categoryItem->removeUser(ircUser)) {
+ if((success = categoryItem->removeUser(ircUser))) {
if(categoryItem->childCount() == 0)
removeChild(i);
break;
if(categoryItem->childCount() == 0)
removeChild(i);
break;
QVariantMap reply;
// Just version information -- check it!
QVariantMap reply;
// Just version information -- check it!
- if(msg.contains("ClientBuild") && msg["ClientBuild"].toUInt() < 732
- || !msg.contains("ClientBuild") && msg["ProtocolVersion"].toUInt() < Global::coreNeedsProtocol) {
+ if((msg.contains("ClientBuild") && msg["ClientBuild"].toUInt() < 732)
+ || (!msg.contains("ClientBuild") && msg["ProtocolVersion"].toUInt() < Global::coreNeedsProtocol)) {
reply["MsgType"] = "ClientInitReject";
reply["Error"] = tr("<b>Your Quassel Client is too old!</b><br>"
"This core needs at least client/core protocol version %1.<br>"
reply["MsgType"] = "ClientInitReject";
reply["Error"] = tr("<b>Your Quassel Client is too old!</b><br>"
"This core needs at least client/core protocol version %1.<br>"
if(buffer->contents().isEmpty())
return;
MsgId msgId = buffer->contents().first()->msgId();
if(buffer->contents().isEmpty())
return;
MsgId msgId = buffer->contents().first()->msgId();
- if(!lastBacklogOffset.isValid() || msgId < lastBacklogOffset && lastBacklogSize + REQUEST_COUNT <= buffer->contents().count()) {
+ if(!lastBacklogOffset.isValid() || (msgId < lastBacklogOffset && lastBacklogSize + REQUEST_COUNT <= buffer->contents().count())) {
Client::backlogManager()->requestBacklog(bufferId, REQUEST_COUNT, msgId.toInt());
lastBacklogOffset = msgId;
lastBacklogSize = buffer->contents().size();
Client::backlogManager()->requestBacklog(bufferId, REQUEST_COUNT, msgId.toInt());
lastBacklogOffset = msgId;
lastBacklogSize = buffer->contents().size();
Qt::ItemFlags BufferViewFilter::flags(const QModelIndex &index) const {
Qt::ItemFlags flags = mapToSource(index).flags();
Qt::ItemFlags BufferViewFilter::flags(const QModelIndex &index) const {
Qt::ItemFlags flags = mapToSource(index).flags();
- if(_config && index == QModelIndex() || index.parent() == QModelIndex())
+ if(_config && (index == QModelIndex() || index.parent() == QModelIndex()))
flags |= Qt::ItemIsDropEnabled;
return flags;
}
flags |= Qt::ItemIsDropEnabled;
return flags;
}