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

List:       kde-commits
Subject:    kdevelop/parts/autoproject
From:       Roberto Raggi <raggi () cli ! di ! unipi ! it>
Date:       2003-03-20 16:42:50
[Download RAW message or body]

CVS commit by raggi: 

fixed bug #50762.. patch provided by Amilcar do Carmo Lucas 
<amilcar@ida.ing.tu-bs.de>


  M +29 -1     targetoptionsdlg.cpp   1.20


--- kdevelop/parts/autoproject/targetoptionsdlg.cpp  #1.19:1.20
@@ -92,5 +92,24 @@ void TargetOptionsDialog::readConfig()
     }
     ldflagsother_edit->setText(l1.join(" "));
-    dependencies_edit->setText(target->dependencies);
+    QString l_dependencies_str = target->dependencies;
+
+    // Remove the implicit dependencies (internal libraries) from the list of
+    // dependencies in order to be able to extract the explicit dependencies.
+    // The explicit dependencies will then be presented to the user (on the edit box )
+    // and the implicit dependencies will only be re-added in the storeConfig()
+    if (target->primary == "PROGRAMS") {
+        QString ldadd_str = target->ldadd;
+        QStringList l_dependencies_lst = QStringList::split(QRegExp("[ \t]"), l_dependencies_str);
+        QStringList ldadd_lst = QStringList::split(QRegExp("[ \t]"), ldadd_str);
+        QStringList::Iterator l_dep_it = ldadd_lst.begin();
+        while (l_dep_it != ldadd_lst.end() && l_dependencies_lst.isEmpty() == false) {
+            QString ldadd_item = *l_dep_it;
+            l_dependencies_lst.remove(ldadd_item);
+            l_dep_it++;
+        }
+        l_dependencies_str = l_dependencies_lst.join(" ");
+    }
+          
+    dependencies_edit->setText(l_dependencies_str);
 
     QString addstr = (target->primary == "PROGRAMS")? target->ldadd : target->libadd;
@@ -147,4 +166,7 @@ void TargetOptionsDialog::storeConfig()
         clitem = static_cast<QCheckListItem*>(clitem->nextSibling());
     }
+    // Form a string with the current selected internal Libraries
+    QString inside_ldadd = liblist.join(" ");
+
     clitem = static_cast<QCheckListItem*>(outsidelib_listview->firstChild());
     while (clitem) {
@@ -180,4 +202,10 @@ void TargetOptionsDialog::storeConfig()
 
     QString new_dependencies = dependencies_edit->text();
+    if (target->primary == "PROGRAMS") {
+        // Add the currenty selected internal Libraries (implicit dependencies) to the dependency list
+        if (!new_dependencies.isEmpty())
+            new_dependencies.append(" "); 
+        new_dependencies.append(inside_ldadd);
+    }
     QString old_dependencies = target->dependencies;
     if (new_dependencies != old_dependencies) {


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

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