List Info

Thread: Remove leftover connect and now unused signal




Remove leftover connect and now unused signal
user name
2006-12-30 20:00:08
Array
qmake4 -recursive, root *.pro handling
user name
2007-07-27 19:38:28
Hi,


patch for using "qmake -recursive" if it is an qt4
project, instead of 
iterating over all items and call qmake.

bugfix handling of root .pro file:
if there was an .pro file with name < then the root prj
dir name, 
projectwidget shows "$(projectDirName).pro" but
trollprojectpart was running 
qmake on first pro file.

also added if there is an .pro file
"$(projectName).pro" use this instead 
of "$(projectDirName).pro"


MfG
Brat





_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

  
Re: qmake4 -recursive, root *.pro handling
user name
2007-07-27 21:52:00
On Saturday 28 July 2007 02:38:28 Thomas Hasart wrote:
> Hi,
>
>
> patch for using "qmake -recursive" if it is
an qt4 project, instead of
> iterating over all items and call qmake.
>
> bugfix handling of root .pro file:
> if there was an .pro file with name < then the root
prj dir name,
> projectwidget shows "$(projectDirName).pro"
but trollprojectpart was
> running qmake on first pro file.
>
> also added if there is an .pro file
"$(projectName).pro" use this instead
> of "$(projectDirName).pro"
>
>
> MfG
> Brat

i had updated the patch to solve the bug "Trollproject
wrong qmake "include" 
handling"

MfG
Brat


_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

  
trollproject, disable sort on sub items
user name
2007-07-27 23:02:55
Hi,
this patch disables sorting in project treewidget, because
the order from 
the .pro file shows the build order of the subprojects.

MfG
Brat



_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

  
trollproject, check for running app
user name
2007-07-27 23:42:51
Hi,
this patch ckecks appFrontend if there is an other running
application, and 
stops it on user request...

MfG
Brat


_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

  
Re: trollproject, disable sort on sub items
user name
2007-07-28 04:49:25
On 28.07.07 06:02:55, Thomas Hasart wrote:
> this patch disables sorting in project treewidget,
because the order from 
> the .pro file shows the build order of the
subprojects.

Uhm, AFAIK QListView doesn't sort its childs automatically
so this
shouldn't be needed. The subprojects are added in the order
that they
are found in the SUBDIRS list.

Also note: That order might not be the build order unless
you checked
the Ordered option.

Andreas

-- 
Go to a movie tonight.  Darkness becomes you.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: trollproject, disable sort on sub items
country flaguser name
Germany
2007-07-28 05:05:48
On Saturday 28 July 2007 11:49:25 Andreas Pakulat wrote:
> On 28.07.07 06:02:55, Thomas Hasart wrote:
> > this patch disables sorting in project treewidget,
because the order from
> > the .pro file shows the build order of the
subprojects.
>
> Uhm, AFAIK QListView doesn't sort its childs
automatically so this
> shouldn't be needed. The subprojects are added in the
order that they
> are found in the SUBDIRS list.
Sorting is explicitly setted on after adding sub items,
thatswhy the patch.


> Also note: That order might not be the build order
unless you checked
> the Ordered option.

Thats right, but the item order is the only thing that shows
the user these 
order.

MfG
Thomas



_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: qmake4 -recursive, root *.pro handling
user name
2007-07-28 07:16:20
On 28.07.07 04:52:00, Thomas Hasart wrote:
> On Saturday 28 July 2007 02:38:28 Thomas Hasart wrote:
> Index:
kdevelop-3.5/buildtools/qmake/qmakescopeitem.cpp
>
============================================================
=======
> --- kdevelop-3.5/buildtools/qmake/qmakescopeitem.cpp   
(revision 693442) 
> +++ kdevelop-3.5/buildtools/qmake/qmakescopeitem.cpp   
(working copy) 
>  -155,7 +155,7 
>      QPtrListIterator<FileItem> it( files );
>      while ( it.current() != 0 )
>      {
> -        if ( it.current() ->text( 0 ) == file )    
 //File already exists in this subproject 
> +        if ( it.current() ->fileName == file )     
//File already exists in this subproject 
>              return ;
>          ++it;
>      }
>  -213,7 +213,7 
>      QPtrListIterator<FileItem> it( files );
>      while ( it.current() != 0 )
>      {
> -        if ( it.current() ->text( 0 ) == filename )
     //File already exists in this subproject 
> +        if ( it.current() ->fileName == filename ) 
    //File already exists in this subproject 
>          {
>              FileItem * fitem = it.current();
>              files.remove( it );
>  -297,6 +297,9 
>      // by default excluded is set to false, thus file
is included
>      //     excluded = exclude;
>      setPixmap( 0, SmallIcon( "document" )
);
> +    fileName=text; 
> +    QStringList
tList=QStringList::split("/",text); 
> +    setText(0,tList.last()); 
>  }

Unless I'm totally mistaken (didn't look at the code for
quite some
weeks) this is wrong. It breaks with relative files.

>
============================================================
=======
> ---
kdevelop-3.5/buildtools/qmake/trollprojectwidget.cpp   
(revision 693442) 
> +++
kdevelop-3.5/buildtools/qmake/trollprojectwidget.cpp   
(working copy) 
>  -327,7 +327,9 
>      QStringList l = dir.entryList( "*.pro"
);
>  
>      QString profile;
> -    if( !l.count() || (l.count() &&
l.findIndex( fi.baseName() + ".pro") != -1  ) ) 
> +    if( l.isEmpty() || (l.count() &&
l.findIndex( m_part->projectName() + ".pro") !=
-1  ) ) 
> +        profile =
m_part->projectName()+".pro"; 
> +    else if( l.isEmpty() || (l.count() &&
l.findIndex( fi.baseName() + ".pro") != -1  ) ) 
>          profile = fi.baseName()+".pro";
>      else
>        profile = l[0];
>  -373,6 +375,7 
>          return m_allFilesCache;
>      m_allFilesCache = m_rootScope->allFiles(
m_rootScope->projectDir() );
>      m_filesCached = true;
> +   
qWarning(m_allFilesCache.join(";").ascii()); 

This warning should probably be removed.

>      return m_allFilesCache;
>  }
>  
>  -595,18 +598,18 
>      QString dirName =
m_shownSubproject->scope->projectDir();
>      FileItem *fitem = static_cast<FileItem*>(
pvitem );
>  
> -    bool isUiFile = QFileInfo( fitem->text( 0 )
).extension() == "ui"; 
> -    kdDebug(9024) << "Opening file: "
<< dirName + "/" +
m_shownSubproject->scope->resolveVariables(
fitem->text( 0 ) ) << endl; 
> +    bool isUiFile = QFileInfo( fitem->fileName
).extension() == "ui"; 
> +    kdDebug(9024) << "Opening file: "
<< dirName + "/" +
m_shownSubproject->scope->resolveVariables(
fitem->fileName ) << endl; 

Same thing as above, the full relative path is needed here,
there are
more places, but I don't think I need to list them all...

  
>  void TrollProjectWidget::emitAddedFile( const QString
&fileName )
>  -2289,16 +2294,21 
>  
>  void TrollProjectWidget::runQMakeRecursive(
QMakeScopeItem* proj )
>  {
> -    if ( proj->scope->scopeType() ==
Scope::ProjectScope ) 
> +    if(m_part->isQt4Project()) 
>      {
> -        m_part->startQMakeCommand(
proj->scope->projectDir() ); 
> +            m_part->startQMakeCommand(
proj->scope->projectDir(),true); 
> +    }else{ 

Please stick to the existing code style here, i.e.
whitespace around
else and { on a new line.

> Index: kdevelop-3.5/buildtools/qmake/scope.cpp
>
============================================================
=======
> --- kdevelop-3.5/buildtools/qmake/scope.cpp   
(revision 693442) 
> +++ kdevelop-3.5/buildtools/qmake/scope.cpp    (working
copy) 
>  -971,6 +971,10 
>  
>  QString Scope::projectDir() const
>  {
> +    if(scopeType()==IncludeScope) 
> +    { 
> +       return  parent()->projectDir(); 
> +    } 

This is not correct I think. A include'd file is always
evaluated by
qmake in its directory, not in the directory of the file
that includes
it, i.e. if I have

src/foo.pro
src/f1/f1.pri

foo.pro: include(f1/f1.pri)

then all stuff inside f1.pri is evaluated with src/f1 as
current
directory.

And this change changes that. So what do you want to fix
with this? Or
is this the fix for trying to read subdir/subdir/foo.pri?

Andreas

-- 
Go to a movie tonight.  Darkness becomes you.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: trollproject, disable sort on sub items
user name
2007-07-28 07:17:00
On 28.07.07 12:05:48, Thomas Hasart wrote:
> On Saturday 28 July 2007 11:49:25 Andreas Pakulat
wrote:
> > On 28.07.07 06:02:55, Thomas Hasart wrote:
> > > this patch disables sorting in project
treewidget, because the order from
> > > the .pro file shows the build order of the
subprojects.
> >
> > Uhm, AFAIK QListView doesn't sort its childs
automatically so this
> > shouldn't be needed. The subprojects are added in
the order that they
> > are found in the SUBDIRS list.
> Sorting is explicitly setted on after adding sub items,
thatswhy the patch.

Ah, right.

Andreas

-- 
Fine day to work off excess energy.  Steal something heavy.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: qmake4 -recursive, root *.pro handling
user name
2007-07-28 14:53:32
I'm sending this back to the list, so others may see my
answers as
well..

On 28.07.07 17:14:45, Thomas Hasart wrote:
> On Saturday 28 July 2007 14:16:20 you wrote:
> > On 28.07.07 04:52:00, Thomas Hasart wrote:
> > > On Saturday 28 July 2007 02:38:28 Thomas
Hasart wrote:
> > > Index:
kdevelop-3.5/buildtools/qmake/qmakescopeitem.cpp
> > >
============================================================
=======
> > > ---
kdevelop-3.5/buildtools/qmake/qmakescopeitem.cpp   
(revision 693442)
> > > +++
kdevelop-3.5/buildtools/qmake/qmakescopeitem.cpp    (working
copy)
> > >  -155,7 +155,7 
> > >      QPtrListIterator<FileItem> it(
files );
> > >      while ( it.current() != 0 )
> > >      {
> > > -        if ( it.current() ->text( 0 ) ==
file )      //File already
> > > exists in this subproject +        if (
it.current() ->fileName == file )
> > >      //File already exists in this subproject
return ;
> > >          ++it;
> > >      }
> > >  -213,7 +213,7 
> > >      QPtrListIterator<FileItem> it(
files );
> > >      while ( it.current() != 0 )
> > >      {
> > > -        if ( it.current() ->text( 0 ) ==
filename )      //File already
> > > exists in this subproject +        if (
it.current() ->fileName ==
> > > filename )      //File already exists in this
subproject {
> > >              FileItem * fitem =
it.current();
> > >              files.remove( it );
> > >  -297,6 +297,9 
> > >      // by default excluded is set to false,
thus file is included
> > >      //     excluded = exclude;
> > >      setPixmap( 0, SmallIcon(
"document" ) );
> > > +    fileName=text;
> > > +    QStringList
tList=QStringList::split("/",text);
> > > +    setText(0,tList.last());
> > >  }
> >
> > Unless I'm totally mistaken (didn't look at the
code for quite some
> > weeks) this is wrong. It breaks with relative
files.
> This is to show the file name, instead the
pathFromPro/filename;

I don't want that, it hides from the user where the file is
and thats
not good.

> > >  void TrollProjectWidget::emitAddedFile(
const QString &fileName )
> > >  -2289,16 +2294,21 
> > >
> > >  void TrollProjectWidget::runQMakeRecursive(
QMakeScopeItem* proj )
> > >  {
> > > -    if ( proj->scope->scopeType() ==
Scope::ProjectScope )
> > > +    if(m_part->isQt4Project())
> > >      {
> > > -        m_part->startQMakeCommand(
proj->scope->projectDir() );
> > > +            m_part->startQMakeCommand(
proj->scope->projectDir(),true);
> > > +    }else{
> >
> > Please stick to the existing code style here, i.e.
whitespace around
> > else and { on a new line.
> >
> > > Index:
kdevelop-3.5/buildtools/qmake/scope.cpp
> > >
============================================================
=======
> > > --- kdevelop-3.5/buildtools/qmake/scope.cpp  
 (revision 693442)
> > > +++ kdevelop-3.5/buildtools/qmake/scope.cpp  
 (working copy)
> > >  -971,6 +971,10 
> > >
> > >  QString Scope::projectDir() const
> > >  {
> > > +    if(scopeType()==IncludeScope)
> > > +    {
> > > +       return  parent()->projectDir();
> > > +    }
> >
> > This is not correct I think. A include'd file is
always evaluated by
> > qmake in its directory, not in the directory of
the file that includes
> > it, i.e. if I have
> >
> > src/foo.pro
> > src/f1/f1.pri
> >
> > foo.pro: include(f1/f1.pri)
> >
> > then all stuff inside f1.pri is evaluated with
src/f1 as current
> > directory.
> Oh thats new for me, I've tested it without
"src/" in pri an it worked. 
> The .pro and .pri for an large project i have create
for a time for Qt 4.0.x
> and there the files are evaluated in the .pro dir (I
had tested it at this 
> time, before i changed the pri files in this way). May
be that this was 
> changed by newer qt versions, but the other way is also
working. Have a look 
> at the qt-sources, there are all pri file SOURCES with
path from from pro 
> file.

Hmm, maybe I was wrong. I remembered this from a thread on
the
qt-interest mailinglist... However I can't reproduce this
with qmake
from Qt4 here, i.e. the include() is always evaluated in the
context of
the file where it is written in. So for

src/src.pro
bar/bar.pri
bar/foo/foo.pri

and include(foo/foo.pri) in bar.pri I get the expected
result.

> Without the patch pri filese with path inside not
handled correct and with the 
> patch without path inside not handled correct.
> So it's not easy to correct the handling for both cases
because i think the 
> entire filepath is also builded outside from the Scope
with 
> projectDir()+$SOURCES.... 

Hmm, do you have a testcase for both problems? I can't even
reproduce
your original problem here with the above sample, i.e. the
include(../bar/bar.pri) properly finds bar.pri and the
include(foo/foo.pri) in bar.pri is also properly visible in
qmake
manager, without any changes from you.

Andreas

-- 
Live in a world of your own, but always welcome visitors.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )