By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 816

Summary: tqtinterface does not detect native tqt3 reliably
Product: TDE Reporter: Darrell <darrella>
Component: tdelibsAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, darrella
Priority: P1    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: Other   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Patch used to build tqtinterface with tqt3 (not qt3) installed.

Description Darrell 2012-01-25 21:34:16 CST
As discussed in the developer's mailing list, the problem is tqtinterface not setting the cmake internal variable TQT_REAL_TQT=1. The cause is in the cmake logic, which fails because the tests are limited to within the /usr directory. As packagers often installed qt3 in a variety of places, that practice continues with tqt3 because there has been no direction to do otherwise.

If tqt3 must be installed in /usr then that information should be posted to the wiki. If that location is not a requirement then the cmake logic should remove the restriction to look only in /usr.

The current as-is test:

if( NOT DEFINED QT_INCLUDE_DIR )
  if( QT_PREFIX_DIR STREQUAL "/usr" )
    if( EXISTS "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
      set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
      set( HAVE_REAL_TQT ON CACHE BOOL "Native TQt3 detected" )
    else( )
      set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" )
    endif( )
  else( )
    set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include" )
  endif( )
endif( )
qt_message( "  QT_INCLUDE_DIR: ${QT_INCLUDE_DIR}" )

Another issue to be addressed is the cmake logic of where to look for the (t)qt3 include headers. There should not be any tests in the cmake logic for specific locations except as a last resort. A better method would be to query the pkgconfig file through the $PKGCONFIG environment variable and determine the include directory from the respective tqt-mt.pc and qt-mt.pc files.

Unless directed in the build instructions at the wiki, packagers might or might not use the -headerdir configure option to build (t)qt3. When that configure option is not used, the header files will be installed in ${QT_PREFIX_DIR}/include and not ${QT_PREFIX_DIR}/include/tqt3 or ${QT_PREFIX_DIR}/include/qt3.

For now this is the patch I am using to build tqtinterface:

============================================================
diff -urN tqtinterface/ConfigureChecks.cmake tqtinterface.new/ConfigureChecks.cmake
--- tqtinterface/ConfigureChecks.cmake  2012-01-24 19:27:56.000000000 -0600
+++ tqtinterface.new/ConfigureChecks.cmake  2012-01-24 19:44:32.000000000 -0600
@@ -47,13 +47,11 @@

 # qt headers
 if( NOT DEFINED QT_INCLUDE_DIR )
-  if( QT_PREFIX_DIR STREQUAL "/usr" )
-    if( EXISTS "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
-      set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
-      set( HAVE_REAL_TQT ON CACHE BOOL "Native TQt3 detected" )
-    else( )
-      set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" )
-    endif( )
+  if( EXISTS "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
+    set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/tqt${QT_VERSION}" )
+    set( HAVE_REAL_TQT ON CACHE BOOL "Native TQt3 detected" )
+  elseif( EXISTS "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" )
+    set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include/qt${QT_VERSION}" )
   else( )
     set( QT_INCLUDE_DIR "${QT_PREFIX_DIR}/include" )
   endif( )
============================================================
Comment 1 Darrell 2012-02-17 14:51:21 CST
Created attachment 360 [details]
Patch used to build tqtinterface with tqt3 (not qt3) installed.
Comment 2 Timothy Pearson 2012-02-18 15:39:47 CST
Fixed in GIT hash 3499ae8.

Let me know if tqtinterface still detects "Qt3" instead of "native TQt3", if it detects "Native TQt3" you should not have any problems.
Comment 3 Darrell 2012-02-19 19:46:40 CST
tqtinterface now builds with TQt3. There are no tdelibs build failures.

There remain some package build failures as reported in the mailing list:

tdebindings
tdeadmin
tdegraphics
tdesdk
kipi-plugins

Those packages build without error with Qt3.

tdebindings has been a mess for a while but if we get the other four resolved we should be in great shape. :)