branches/KDE/3.5/kdevelop/buildtools/qmake

Andreas Pakulat apaku at gmx.de
Wed May 30 19:20:45 UTC 2007


SVN commit 669913 by apaku:

Make Release&Debug an non-exclusive option, the QM now allows to specify which
build is the default target when using Release&Debug build.
BUG:145711
CCMAIL:kdevelop-devel at kdevelop.org


 M  +23 -9     projectconfigurationdlg.cpp  
 M  +3 -3      projectconfigurationdlgbase.ui  


--- branches/KDE/3.5/kdevelop/buildtools/qmake/projectconfigurationdlg.cpp #669912:669913
@@ -243,14 +243,26 @@
     }
 
     // Buildmode
-  if ( radioReleaseMode->isChecked() )
+    int releaseidx = myProjectItem->scope->variableValues( "CONFIG" ).findIndex( "release" );
+    int debugidx = myProjectItem->scope->variableValues( "CONFIG" ).findIndex( "debug" );
+    if ( radioReleaseMode->isChecked() )
+    {
+        if( releaseidx != -1 && releaseidx < debugidx )
+            myProjectItem->removeValue( "CONFIG", "debug" );
+        else if( debugidx != -1 )
+            myProjectItem->removeValue( "CONFIG", "debug" );
         myProjectItem->addValue( "CONFIG", "release" );
-    else
+    }else if( !checkDebugReleaseMode->isChecked() )
         myProjectItem->removeValue( "CONFIG", "release" );
 
     if ( radioDebugMode->isChecked() )
+    {
+        if( debugidx != -1 && debugidx < releaseidx )
+            myProjectItem->removeValue( "CONFIG", "release" );
+        else if( releaseidx != -1 )
+            myProjectItem->removeValue( "CONFIG", "release" );
         myProjectItem->addValue( "CONFIG", "debug" );
-    else
+    }else if( !checkDebugReleaseMode->isChecked() )
         myProjectItem->removeValue( "CONFIG", "debug" );
 
     // requirements
@@ -318,7 +330,7 @@
     //Qt4 libs
     if ( prjWidget->m_part->isQt4Project() )
     {
-        if ( radioDebugReleaseMode->isChecked() )
+        if ( checkDebugReleaseMode->isChecked() )
             myProjectItem->addValue( "CONFIG", "debug_and_release" );
         else
             myProjectItem->removeValue( "CONFIG", "debug_and_release" );
@@ -706,17 +718,19 @@
     }
 
     // Buildmode
-    if ( configValues.findIndex( "debug" ) != -1 )
+    int debugidx = configValues.findIndex( "debug" );
+    int releaseidx = configValues.findIndex( "release" );
+    if ( debugidx != -1 && debugidx > releaseidx )
     {
         radioDebugMode->setChecked( true );
     }
-    else if ( configValues.findIndex( "release" ) != -1 )
+    if ( releaseidx != -1 && releaseidx > debugidx )
     {
         radioReleaseMode->setChecked( true );
     }
-    else if ( configValues.findIndex( "debug_and_release" ) != -1 )
+    if ( configValues.findIndex( "debug_and_release" ) != -1 )
     {
-        radioDebugReleaseMode->setChecked( true );
+        checkDebugReleaseMode->setChecked( true );
     }
 
     // Requirements
@@ -830,7 +844,7 @@
         else
             checkQt3Support->setChecked( false );
 
-        radioDebugReleaseMode->setEnabled( true );
+        checkDebugReleaseMode->setEnabled( true );
         checkBuildAll->setEnabled( true );
         groupQt4Libs->setEnabled( checkQt->isChecked() );
         rccdir_url->setEnabled( true );
--- branches/KDE/3.5/kdevelop/buildtools/qmake/projectconfigurationdlgbase.ui #669912:669913
@@ -405,9 +405,9 @@
                                             <string>Set project to be built in release mode</string>
                                         </property>
                                     </widget>
-                                    <widget class="QRadioButton">
+                                    <widget class="QCheckBox">
                                         <property name="name">
-                                            <cstring>radioDebugReleaseMode</cstring>
+                                            <cstring>checkDebugReleaseMode</cstring>
                                         </property>
                                         <property name="enabled">
                                             <bool>false</bool>
@@ -2640,7 +2640,7 @@
     <tabstop>makefile_url</tabstop>
     <tabstop>radioDebugMode</tabstop>
     <tabstop>radioReleaseMode</tabstop>
-    <tabstop>radioDebugReleaseMode</tabstop>
+    <tabstop>checkDebugReleaseMode</tabstop>
     <tabstop>checkWarning</tabstop>
     <tabstop>checkBuildAll</tabstop>
     <tabstop>checkOpenGL</tabstop>




More information about the KDevelop-devel mailing list