[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/libs/kgllib/examples/spinninglogos
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2008-09-17 17:58:00
Message-ID: 1221674280.638677.28939.nullmailer () svn ! kde ! org
[Download RAW message or body]

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");
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic