Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 12, 2010, 12:47:30 AM (14 years ago)
Author:
rgrieder
Message:

Basic stuff up and running for the Qt sandbox.
No GUI support yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox_qt/src/libraries/util/StringUtils.cc

    r7401 r7421  
    3535
    3636#include <cctype>
    37 #include <boost/scoped_array.hpp>
     37#include <QVarLengthArray>
     38#include <QDir>
     39
    3840#include "Convert.h"
    3941#include "Math.h"
     
    493495        size_t cols = str1.size() + 1;
    494496        size_t rows = str2.size() + 1;
    495         boost::scoped_array<int> matrix(new int[rows * cols]);
     497        QVarLengthArray<int> matrix(rows * cols);
    496498
    497499        for (size_t r = 0; r < rows; ++r)
     
    516518        return matrix[(rows-1)*cols + cols-1];
    517519    }
     520
     521    QDir& operator/=(QDir& lhs, const QDir& rhs)
     522    {
     523        lhs.setPath(lhs.path() + QDir::separator() + rhs.path());
     524        return lhs;
     525    }
     526
     527    QDir& operator/=(QDir& lhs, const QString& rhs)
     528    {
     529        return operator/=(lhs, QDir(rhs));
     530    }
     531
     532    QDir operator/(const QDir& lhs, const QDir& rhs)
     533    {
     534        return (QDir(lhs) /= rhs);
     535    }
     536
     537    QDir operator/(const QDir& lhs, const QString& rhs)
     538    {
     539        return operator/(lhs, QDir(rhs));
     540    }
    518541}
Note: See TracChangeset for help on using the changeset viewer.