[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 86265] KDELibs PCS Importer ignores KDEDIRS
From: Eike Welk <eike.welk () post ! rwth-aachen ! de>
Date: 2004-08-18 23:44:56
Message-ID: 20040818234456.3504.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=86265
------- Additional Comments From eike.welk post rwth-aachen de 2004-08-19 01:44 -------
On Friday 30 July 2004 10:36, Stephan Kulow wrote:
> ------- Why isn't this code using
> KStandardDirs::findDirs("include") instead of trying to emulate it?
I have redone the patch.
I find the way I'm using the standard dir object rather clumsy since I
have to register the type first. I think it would be nicer if one
could write:
kdedirs=KApplication::kApplication()->dirs()->findDirs("KDE","include");
and
qtdirs==KApplication::kApplication()->dirs()->findDirs("QT","include");
Should I submit a patch or would this be hardly ever used?
Here is the new patch:
----------------------------------------------------------------------------------------------
Index: settingsdialog.cpp
===================================================================
RCS
file: /home/kde/kdevelop/languages/cpp/pcsimporter/kdelibsimporter/settingsdialog.cpp,v
retrieving revision 1.6
diff -u -3 -p -u -r1.6 settingsdialog.cpp
--- settingsdialog.cpp 20 Nov 2003 22:47:39 -0000 1.6
+++ settingsdialog.cpp 18 Aug 2004 23:23:47 -0000
@ -10,6 +10,8 @
***************************************************************************/
#include "settingsdialog.h"
+#include <kapplication.h>
+#include <kstandarddirs.h>
#include <klistbox.h>
#include <kcombobox.h>
#include <qfile.h>
@ -41,16 +43,8 @ QListBoxItem* QListBox_selectedItem(QLis
SettingsDialog::SettingsDialog(QWidget* parent, const char* name,
WFlags fl)
: SettingsDialogBase(parent,name,fl)
{
- QStringList kdedirs;
- kdedirs.push_back( ::getenv("KDEDIR") + QString("/include") );
- kdedirs.push_back( "/usr/lib/kde/include" );
- kdedirs.push_back( "/usr/local/kde/include" );
- kdedirs.push_back( "/usr/local/include" );
- kdedirs.push_back( "/usr/kde/include" );
- kdedirs.push_back( "/usr/include/kde" );
- kdedirs.push_back( "/usr/include" );
- kdedirs.push_back( "/opt/kde3/include" );
- kdedirs.push_back( "/opt/kde/include" );
+
KApplication::kApplication()->dirs()->addResourceType("include","include");
+ QStringList
kdedirs=KApplication::kApplication()->dirs()->findDirs("include","");
for( QStringList::Iterator it=kdedirs.begin(); it!=kdedirs.end();
++it )
{
----------------------------------------------------------------------------------------------
Eike.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic