Revert "Cmake find_package files"

This reverts commit 6c98307df792af0d91a5d109c35bcb7b8b34c500.
Cmake find_package files for the QtXdg
Use the QtTestLib facilities

The tests didn't use the QtTestLib library. It was not clear if the tests
were successful or not. QtTestLib makes it very clear.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Adds test target to CMake

Configure with tests enabled:
    cmake -DBUILD_TESTS=Yes ..

To run the test suite (after building) just type:
    make test

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Adds support to Qt5 in the buildsystem

It adds an option USE_QT5. If the option is TRUE Qt5 will be used, in all
other cases Qt4 (default) will be used.

Ex: cmake -DUSE_QT5=Yes ..  # Uses Qt5
    cmake ..                # Uses Qt4

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Ran fixqt4headers

Command: fixqt4headers.pl --strip-modules
Uses --strip-modules to minimize conditional version compilation.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Port QDesktopServices

Parts of QDesktopservices were moved to QStandardPaths.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Port QString::toAscii()

Use toLatin1() instead.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Adds QMimeData include file

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Replaces QIconEngineV2 with QIconEngine

QIconEngineV2 was merged into QIconEngine.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Replace Q_GLOBAL_STATIC_WITH_INITIALIZER

It's not part of the public API and it was removed. Q_GLOBAL_STATIC is now
part of public API.

References:
http://lists.qt-project.org/pipermail/development/2012-March/002636.html

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Make BUILD_TESTS an option

This makes
    cmake -DBUILD_TESTS=Yes ..
    cmake -DBUILD_TESTS=YES ..
    cmake -DBUILD_TESTS=On ..
    cmake -DBUILD_TESTS=ON ..
    ...
work as expected (tests will be built). If BUILD_TESTS isn't an option
only cmake -DBUILD_TESTS=Yes .. works.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Explicitly requires QtTest module

If BUILD_TESTS is On make QtTest/Qt5Test REQUIRED.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
qtxdg/test: Removes the project command and cmake_minimum_required()

The tests aren't a project and shouldn't be compiled independently.
Without the project() and cmake_minimum_required() it's not possible to
compile it independently.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Adds missing library (Qt5Xml) to qtxdg target

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
qtxdg/test: Removes Qt4 CMake stuff

We now support Qt4 and Qt5. It's all done in the main CMakeLists.txt

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
qtxdg/test: Adapts the build system to support Qt4 and Qt5

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Removes unneeded set(QT_USE_QTXML TRUE)

QtXml is REQUIRED. We don't need to set QT_USE_XML TRUE.

Reported-by: Alexander Sokolov <sokoloff.a@gmail.com>
Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Packs Qt version specific stuff

Easier to understand and maintain.

Suggested-by: Alexander Sokolov <sokoloff.a@gmail.com>
Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
Renames the Qt5 build

Qt4 and Qt5 build will coexist in many systems. They must have a
different name so they will not clash.
Qt5Xdg is the name for the Qt5 build. All the other installables are
installed into an qt5xdg dir.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>