List Info

Thread: Code completion




Code completion
user name
2006-11-17 15:07:17
I currently use Qt 4 in my projects, and would like to be able to use code completion for my user interface classes.  Since the ui headers generated by uic are not part of the project, code completion does not pick these files up.  However, I entered the location of these files into the Custom include paths field (as Debug/ui) in the project settings.  Code completion still does not pickup the classes.  I removed the .pcs file from the project directory as well to no avail.  Assuming I am using this field correctly, this seems to be a bug.
 
A couple other small quirks with code completion: automatic code completion comes on in comment blocks and also when the cursor is position at the end of an already complete variable name (both of which are pretty annoying). 
 
Kris Wong
Code completion
user name
2006-11-17 15:15:55
Please test this with KDevelop-3.4 (RC1 or SVN), unless you
are already.

// jens

On 11/17/06, Kris Wong <wongkseapine.com> wrote:
>
>
> I currently use Qt 4 in my projects, and would like to
be able to use code
> completion for my user interface classes.  Since the ui
headers generated by
> uic are not part of the project, code completion does
not pick these files
> up.  However, I entered the location of these files
into the Custom include
> paths field (as Debug/ui) in the project settings. 
Code completion still
> does not pickup the classes.  I removed the .pcs file
from the project
> directory as well to no avail.  Assuming I am using
this field correctly,
> this seems to be a bug.
>
> A couple other small quirks with code completion:
automatic code completion
> comes on in comment blocks and also when the cursor is
position at the end
> of an already complete variable name (both of which are
pretty annoying).
>
> Kris Wong
> _______________________________________________
> KDevelop-devel mailing list
> KDevelop-develbarney.cs.uni-potsdam.de
> https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
>
>
>

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 15:15:28
Am Freitag, 17. November 2006 16:07 schrieb Kris Wong:
> I currently use Qt 4 in my projects, and would like to
be able to use
> code completion for my user interface classes.  Since
the ui headers
> generated by uic are not part of the project, code
completion does not
> pick these files up.  However, I entered the location
of these files
> into the Custom include paths field (as Debug/ui) in
the project
> settings.  Code completion still does not pickup the
classes.  I removed
> the .pcs file from the project directory as well to no
avail.  Assuming
> I am using this field correctly, this seems to be a
bug.
>
> A couple other small quirks with code completion:
automatic code
> completion comes on in comment blocks and also when the
cursor is
> position at the end of an already complete variable
name (both of which
> are pretty annoying).
>
> Kris Wong

What Version of kdevelop are you using?

David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 15:29:27
> What Version of kdevelop are you using?

Sorry, forgot to mention.  I am running 3.4 out of svn,
current as of 2
days ago.

Kris Wong

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 16:13:25
Am Freitag, 17. November 2006 16:07 schrieb Kris Wong:
> I currently use Qt 4 in my projects, and would like to
be able to use
> code completion for my user interface classes.  Since
the ui headers
> generated by uic are not part of the project, code
completion does not
> pick these files up.  However, I entered the location
of these files
> into the Custom include paths field (as Debug/ui) in
the project
> settings.  Code completion still does not pickup the
classes.  I removed
> the .pcs file from the project directory as well to no
avail.  Assuming
> I am using this field correctly, this seems to be a
bug.
>
> A couple other small quirks with code completion:
automatic code
> completion comes on in comment blocks and also when the
cursor is
> position at the end of an already complete variable
name (both of which
> are pretty annoying).
>
> Kris Wong

Ok then. 

About the custom include-paths: Those are currently only
used by the 
preprocessor(for macros), for choosing the correct item
among multiple with 
the same name, and for applying namespace-aliases/imports.
Included files are 
not put into the code-model(I'd implement it, but it's not
possible because 
of the feature-freeze).
So to have completion for your user-interface classes, you
will simply have to 
import them into the project.

I'll look at the completion-in-comments thing again. I
thought I fixed it 
once, it shouldn't be hard to re-fix it. 

I'll also look at the second small quirk, although that
logic wasn't done by 
me, it shouldn't be very hard to fix.

greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 16:44:26
On 17.11.06 17:13:25, David Nolden wrote:
> Am Freitag, 17. November 2006 16:07 schrieb Kris Wong:
> > I currently use Qt 4 in my projects, and would
like to be able to use
> > code completion for my user interface classes. 
Since the ui headers
> > generated by uic are not part of the project, code
completion does not
> > pick these files up.  However, I entered the
location of these files
> > into the Custom include paths field (as Debug/ui)
in the project
> > settings.  Code completion still does not pickup
the classes.  I removed
> > the .pcs file from the project directory as well
to no avail.  Assuming
> > I am using this field correctly, this seems to be
a bug.
[...]
> So to have completion for your user-interface classes,
you will simply have to 
> import them into the project.

Hmm, David, which function do you use to get the files for a
project?
I'm thinking about adding foobar_ui.h for all foobar.ui in
the qmake
manager. 

Do you know wether the .cpp's are needed for Qt3 ui-forms to
provide
code-completion? I don't want to put them into the
source-file-list if
they're not needed...

Andreas

-- 
A gift of a flower will soon be made to you.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 18:23:53
Am Freitag, 17. November 2006 17:44 schrieb Andreas Pakulat:
> Hmm, David, which function do you use to get the files
for a project?
> I'm thinking about adding foobar_ui.h for all foobar.ui
in the qmake
> manager.
>
> Do you know wether the .cpp's are needed for Qt3
ui-forms to provide
> code-completion? I don't want to put them into the
source-file-list if
> they're not needed...
>
> Andreas

As far is I can see mainly the project allFiles()-function
is used(also 
signals like fileAdded or similar).

The cpp-files should not be needed at all for the
completion, only the headers 
are needed.

greetings, David

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 20:08:54
On 17.11.06 19:23:53, David Nolden wrote:
> Am Freitag, 17. November 2006 17:44 schrieb Andreas
Pakulat:
> > Hmm, David, which function do you use to get the
files for a project?
> > I'm thinking about adding foobar_ui.h for all
foobar.ui in the qmake
> > manager.
> >
> > Do you know wether the .cpp's are needed for Qt3
ui-forms to provide
> > code-completion? I don't want to put them into the
source-file-list if
> > they're not needed...
> >
> > Andreas
> 
> As far is I can see mainly the project
allFiles()-function is used(also 
> signals like fileAdded or similar).

Hmm, that is a problem. allFiles is supposed to only return
files that
belong to the project, not any generated ones. The same with
addedFiles.

So unfortunately there's no way to resolve this in the
manager. 

But David there might be a solution in your code, the
.ui-files are
always part of allFiles and thus you could just check wether
<filename_without_.ui>_ui.h or
<filename_without_.ui>.h exists and parse
that too. Would that be an option?

Andreas

-- 
You will always have good luck in your personal affairs.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 20:18:53
> But David there might be a solution in your code, the
.ui-files are
> always part of allFiles and thus you could just check
wether
> <filename_without_.ui>_ui.h or
<filename_without_.ui>.h exists and
parse
> that too. Would that be an option?

The *_ui.h headers can be anywhere on the disk, though.  For
instance,
in my projects they are in a subdir of the build directory,
which means
this would not work for me.

Kris Wong

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
Code completion
user name
2006-11-17 22:44:36
On 17.11.06 15:18:53, Kris Wong wrote:
> > But David there might be a solution in your code,
the .ui-files are
> > always part of allFiles and thus you could just
check wether
> > <filename_without_.ui>_ui.h or
<filename_without_.ui>.h exists and
> parse
> > that too. Would that be an option?
> 
> The *_ui.h headers can be anywhere on the disk, though.
 For instance,
> in my projects they are in a subdir of the build
directory, which means
> this would not work for me.

Well, then there's actually no way to do this easily. The
parser would
need to have access to the internals of the project manager
- i.e. where
such generated files are put.

Andreas

-- 
Artistic ventures highlighted.  Rob a museum.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
[1-10] [11-12]

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