Fix for Bug #39538

W. Tasin tasin at fhm.edu
Fri Mar 22 07:16:02 UTC 2002


Hi Harry,

COMPLAIN! ;-)
always the same problem since ages ;-)
Please don't do it this way, because it would take again 3 weeks till 
the next one reports a bug like:

"Some lib-entry will not be recognized!"

Imagine the following entry done with the textedit field:
"-lqt -lX11 -lkfile"

First it recognises -X11 and the new ldadd is:
"-lqt-lkfile"

Isn't it?


Another problem is that there has to be a blank at the end of ldadd, 
which always causes an additional blank everytime you call project options.

Please try to make a path like:

1) before entering in this if-clauses add a blank at the beginning and 
the end of ldadd

2) use sth like

ldadd = ldadd.replace( QRegExp(" -lX11 "), " " );

3) strip left and right bounded white spaces after all checkings were 
done, so the rest can be used as context for the text editfield.


Ciao

Walter

Harald Fernengel wrote:

>Hi,
>
>this is pretty straight-forward, if we encounter  " -lm" in the additional 
>libraries edit we replace it with "" and check the "libmath" checkbox. 
>Problem: " -lmylib" gets "ylib" which is pretty stupid (Bug #39538).
>
>If no one complains I'll commit in a few hours so it gets into the release...
>
>Best regards,
>Harry
>
>
>------------------------------------------------------------------------
>
>Index: cprjoptionsdlg.cpp
>===================================================================
>RCS file: /home/kde/kdevelop/kdevelop/Attic/cprjoptionsdlg.cpp,v
>retrieving revision 1.26.2.21.2.22.2.13
>diff -u -3 -p -r1.26.2.21.2.22.2.13 cprjoptionsdlg.cpp
>--- cprjoptionsdlg.cpp	2002/03/02 17:53:34	1.26.2.21.2.22.2.13
>+++ cprjoptionsdlg.cpp	2002/03/21 19:02:56
>@@ -304,7 +304,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_X11->setText("X11");
>   l_X11->setChecked(ldadd.find(" -lX11 ") != -1);
>   if (l_X11->isChecked())
>-    ldadd = ldadd.replace( QRegExp(" -lX11"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lX11 "), "" );
>   QWhatsThis::add(l_X11, i18n("X11 basics "));
> 
>   l_Xext=new QCheckBox(libs_group,"l_Xext");
>@@ -312,7 +312,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_Xext->setText("Xext");
>   l_Xext->setChecked(ldadd.find(" -lXext ") != -1);
>   if (l_Xext->isChecked())
>-    ldadd = ldadd.replace( QRegExp(" -lXext"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lXext "), "" );
>   QWhatsThis::add(l_Xext, i18n("X11 extensions "));
> 
>   l_qt=new QCheckBox(libs_group,"l_qt");
>@@ -321,7 +321,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_qt->setChecked((ldadd.find(" -lqt ") != -1) || (ldadd.find(" $(LIB_QT) ") != -1));
>   if (l_qt->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lqt"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lqt "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_QT\\)"), "" );
>   }
>   QWhatsThis::add(l_qt, i18n("Qt"));
>@@ -343,7 +343,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_kdeui->setChecked((ldadd.find(" -lkdeui ")  != -1)|| (ldadd.find(" $(LIB_KDEUI) ") != -1));
>   if (l_kdeui->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lkdeui"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkdeui "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_KDEUI\\)"), "" );
>   }
>   QWhatsThis::add(l_kdeui, i18n("KDE user interface"));
>@@ -354,7 +354,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_khtml->setChecked((ldadd.find(" -lkhtml ")  != -1) || (ldadd.find(" $(LIB_KHTML) ") != -1));
>   if (l_khtml->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lkhtml"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkhtml "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_KHTML\\)"), "" );
>   }
>   QWhatsThis::add(l_khtml, i18n("KDE HTML widget"));
>@@ -364,7 +364,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_kfm->setText("kfm");
>   l_kfm->setChecked(ldadd.find(" -lkfm ") != -1);
>   if (l_kfm->isChecked())
>-    ldadd = ldadd.replace( QRegExp(" -lkfm"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkfm "), "" );
>   // TODO add note that this is KDE-1 only, or remove checkbox if project isn't a KDE-1 project
>   QWhatsThis::add(l_kfm, i18n("KDE kfm functionality"));
> 
>@@ -374,7 +374,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_kfile->setChecked((ldadd.find(" -lkfile ") != -1) || (ldadd.find(" $(LIB_KFILE) ") != -1));
>   if (l_kfile->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lkfile"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkfile "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_KFILE\\)"), "" );
>   }
>   QWhatsThis::add(l_kfile, i18n("KDE file handling"));
>@@ -385,7 +385,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_kparts->setChecked((ldadd.find(" -lkparts ") != -1) || (ldadd.find(" $(LIB_KPARTS) ") != -1));
>   if (l_kparts->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lkparts"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkparts "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_KPARTS\\)"), "" );
>   }
>   QWhatsThis::add(l_kparts, i18n("KDE component architecture"));
>@@ -396,7 +396,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_kspell->setChecked((ldadd.find(" -lkspell ") != -1) || (ldadd.find(" $(LIB_KSPELL) ") != -1));
>   if (l_kspell->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lkspell"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkspell "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_KSPELL\\)"), "" );
>   }
>   QWhatsThis::add(l_kspell, i18n("KDE Spell checking"));
>@@ -407,7 +407,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_kab->setChecked((ldadd.find(" -lkab ") != -1) || (ldadd.find(" $(LIB_KAB) ") != -1));
>   if (l_kab->isChecked())
>   {
>-    ldadd = ldadd.replace( QRegExp(" -lkab"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lkab "), "" );
>     ldadd = ldadd.replace( QRegExp(" \\$\\(LIB_KAB\\)"), "" );
>   }
>   QWhatsThis::add(l_kab, i18n("KDE addressbook"));
>@@ -417,7 +417,7 @@ void CPrjOptionsDlg::addLinkerPage()
>   l_math->setText("math");
>   l_math->setChecked(l_khtml->isChecked() || (ldadd.find(" -lm ") != -1));
>   if (l_math->isChecked())
>-    ldadd = ldadd.replace( QRegExp(" -lm"), "" );
>+    ldadd = ldadd.replace( QRegExp(" -lm "), "" );
>   QWhatsThis::add(l_math, i18n("Math library"));
> 
>   QLabel* addit_ldadd_label;
>

-- 
The KDevelop project: tasin at kdevelop.de [www.kdevelop.org]
--
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W. Tasin, FB 04,FHM-------------------PGP-KeyID:0x7961A645----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20020322/6f799aa4/attachment.html>


More information about the KDevelop-devel mailing list