From kde-commits Wed Sep 17 17:58:00 2008 From: Rivo Laks Date: Wed, 17 Sep 2008 17:58:00 +0000 To: kde-commits Subject: playground/libs/kgllib/examples/spinninglogos Message-Id: <1221674280.638677.28939.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122167430029254 SVN commit 861977 by rivol: Use qt resource system here as well. KGLLib can now be compiled with srcdir = builddir (not that it's a good idea) and the demos can be run anywhere. M +2 -1 CMakeLists.txt M +2 -2 logos.cpp A logos.qrc D spinninglogos --- trunk/playground/libs/kgllib/examples/spinninglogos/CMakeLists.txt #861976:861977 @@ -8,6 +8,7 @@ logos.cpp ) qt4_automoc(${spinninglogos_SRCS}) -add_executable(spinninglogos ${spinninglogos_SRCS}) +qt4_add_resources(spinninglogos_RESOURCES logos.qrc) +add_executable(spinninglogos ${spinninglogos_SRCS} ${spinninglogos_RESOURCES}) target_link_libraries(spinninglogos kgllib-extras) --- trunk/playground/libs/kgllib/examples/spinninglogos/logos.cpp #861976:861977 @@ -59,8 +59,8 @@ GLWidget::initializeGL(); // Load logo textures - mKDELogoTex = new Texture("kde.png"); - mQtLogoTex = new Texture("qt.png"); + mKDELogoTex = new Texture(":/kde.png"); + mQtLogoTex = new Texture(":/qt.png"); // If either of the logos couldn't be loaded then show an error if (!mKDELogoTex->isValid() || !mQtLogoTex->isValid()) { return setErrorText("Data couldn't be loaded");