make quassel compile on msvc
authorBenjamin Zeller <zbenjamin@libqxt.org>
Fri, 19 Oct 2007 12:41:46 +0000 (12:41 +0000)
committerBenjamin Zeller <zbenjamin@libqxt.org>
Fri, 19 Oct 2007 12:41:46 +0000 (12:41 +0000)
src/client/buffertreemodel.cpp
src/client/client.cpp
src/client/treemodel.cpp
src/common/util.cpp
src/qtgui/tabcompleter.cpp

index fc9ea51..568f7e6 100644 (file)
@@ -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<NetworkTreeItem*>(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);
     
index 55bf9c5..6b941c6 100644 (file)
@@ -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++;
     }
 
index 27bcb5b..795eb1e 100644 (file)
@@ -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();
index 47541ee..2fdeead 100644 (file)
@@ -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<uint>(m,0));
 
   for(uint i = 0; i < n; i++)
     matrix[i][0] = i;
index 5b3e97f..2b13097 100644 (file)
@@ -49,7 +49,7 @@ void TabCompleter::buildCompletionList() {
 }
 
 void TabCompleter::complete() {
-  if (not enabled) {
+  if (! enabled) {
     buildCompletionList();
     enabled = true;  
   }