From 017582b02dcf25ed4027c54fbcd652004b103f91 Mon Sep 17 00:00:00 2001 From: Benjamin Zeller Date: Fri, 19 Oct 2007 12:41:46 +0000 Subject: [PATCH] make quassel compile on msvc --- src/client/buffertreemodel.cpp | 4 ++-- src/client/client.cpp | 6 +++--- src/client/treemodel.cpp | 2 +- src/common/util.cpp | 3 ++- src/qtgui/tabcompleter.cpp | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/client/buffertreemodel.cpp b/src/client/buffertreemodel.cpp index fc9ea519..568f7e6c 100644 --- a/src/client/buffertreemodel.cpp +++ b/src/client/buffertreemodel.cpp @@ -142,7 +142,7 @@ QModelIndex BufferTreeModel::getOrCreateNetworkItemIndex(Buffer *buffer) { QString net = buffer->networkName(); TreeItem *networkItem; - if(not(networkItem = rootItem->childById(qHash(net)))) { + if(!(networkItem = rootItem->childById(qHash(net)))) { int nextRow = rootItem->childCount(); networkItem = new NetworkTreeItem(net, rootItem); @@ -160,7 +160,7 @@ QModelIndex BufferTreeModel::getOrCreateBufferItemIndex(Buffer *buffer) { NetworkTreeItem *networkItem = static_cast(networkItemIndex.internalPointer()); TreeItem *bufferItem; - if(not(bufferItem = networkItem->childById(buffer->bufferInfo().uid()))) { + if(!(bufferItem = networkItem->childById(buffer->bufferInfo().uid()))) { int nextRow = networkItem->childCount(); bufferItem = new BufferTreeItem(buffer, networkItem); diff --git a/src/client/client.cpp b/src/client/client.cpp index 55bf9c54..6b941c65 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -343,18 +343,18 @@ void Client::updateCoreConnectionProgress() { int numChannelsWaiting = 0; foreach(NetworkInfo *net, networkInfos()) { - if(not net->initialized()) + if(! net->initialized()) numNetsWaiting++; numIrcUsers += net->ircUsers().count(); foreach(IrcUser *user, net->ircUsers()) { - if(not user->initialized()) + if(! user->initialized()) numIrcUsersWaiting++; } numChannels += net->ircChannels().count(); foreach(IrcChannel *channel, net->ircChannels()) { - if(not channel->initialized()) + if(! channel->initialized()) numChannelsWaiting++; } diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index 27bcb5b0..795eb1ed 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -89,7 +89,7 @@ int TreeItem::columnCount() const { } QVariant TreeItem::data(int column, int role) const { - if(role == Qt::DisplayRole and column < itemData.count()) + if(role == Qt::DisplayRole && column < itemData.count()) return itemData[column]; else return QVariant(); diff --git a/src/common/util.cpp b/src/common/util.cpp index 47541eef..2fdeead1 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -102,7 +102,8 @@ bool readDataFromDevice(QIODevice *dev, quint32 &blockSize, QVariant &item) { uint editingDistance(const QString &s1, const QString &s2) { uint n = s1.size()+1; uint m = s2.size()+1; - uint matrix[n][m]; + //uint matrix[n][m]; + QVector< QVector< uint > >matrix(n,QVector(m,0)); for(uint i = 0; i < n; i++) matrix[i][0] = i; diff --git a/src/qtgui/tabcompleter.cpp b/src/qtgui/tabcompleter.cpp index 5b3e97f1..2b130970 100644 --- a/src/qtgui/tabcompleter.cpp +++ b/src/qtgui/tabcompleter.cpp @@ -49,7 +49,7 @@ void TabCompleter::buildCompletionList() { } void TabCompleter::complete() { - if (not enabled) { + if (! enabled) { buildCompletionList(); enabled = true; } -- 2.20.1