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

List:       kde-commits
Subject:    branches/kdevelop/3.4/buildtools/qmake
From:       Ian Reinhart Geiser <geiseri () kde ! org>
Date:       2006-08-24 22:30:39
Message-ID: 1156458639.883882.7094.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 576838 by geiseri:

It seems if you are a crackwhore with two .pro files
in a project directory it will use the first one.  So
in this case the rules are as follows:
1) if the (dirname).pro file is present use that, since
        that is what qmake will do.
2) if there is not a .pro file with that name, then use
        that .pro file.  NOTE this will break recursive
        qmake, but it is valid at the toplevel.
3) if nothing is there, well they are idiots, and we will
	try to create a dummy .pro file that should be 
	saved when they edit it.

NOTE:  I think we need to be smarter here and only process
	.pro files that are explicitly in SUBDIRS targets,
	since this will make this all a moot point, and allow
	us support for that SUBDIRS += target1.pro target2.pro
	hack.



 M  +5 -2      trollprojectwidget.cpp  


--- branches/kdevelop/3.4/buildtools/qmake/trollprojectwidget.cpp #576837:576838
@@ -3048,8 +3048,11 @@
 //    QString proname = item->path + "/" + fi.baseName() + ".pro";
     QDir dir(item->path);
     QStringList l = dir.entryList("*.pro");
-
-    item->pro_file = l.count()?l[0]:(fi.baseName() + ".pro");
+    if( QFile::exists( dir.absPath () + "/" + (dir.dirName() + ".pro") ) )
+      item->pro_file = dir.dirName() + ".pro";
+    else
+      item->pro_file = l.count()?l[0]:(fi.baseName() + ".pro");
+        
     QString proname = item->path + "/" + item->pro_file;
 
     kdDebug(9024) << "Parsing " << proname << endl;
[prev in list] [next in list] [prev in thread] [next in thread] 

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