Merge commit 'origin/0.9.1-beta'
@@ -39,12 +39,14 @@ that you:
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\section1 Submitting Code
|
\section1 Submitting Code
|
||||||
|
|
||||||
|
Send your contributions to qt-creator@trolltech.com
|
||||||
|
|
||||||
It is implicitly understood that all patches contributed to The Qt Creator
|
It is implicitly understood that all patches contributed to The Qt Creator
|
||||||
Project are made under under the Gnu General Public License, version 2 or later
|
Project are made under under the Gnu General Public License, version 2 or later
|
||||||
and
|
and currently we require that you sign a copyright assignment form. We are
|
||||||
|
working on a better solution.
|
||||||
|
|
||||||
If you have a problem with that, don't contribute code.
|
If you have a problem with that, don't contribute code.
|
||||||
|
|
||||||
@@ -54,12 +56,11 @@ ideas with the other developers on mailing list first.
|
|||||||
|
|
||||||
When you create the patch, please use git or use "diff -up" since we find
|
When you create the patch, please use git or use "diff -up" since we find
|
||||||
that a lot easier to read than the other diff formats. Also please do not
|
that a lot easier to read than the other diff formats. Also please do not
|
||||||
send patches that implements or fixes several different things; several
|
send patches that implement or fixes several different things; several
|
||||||
patches is a much better option.
|
patches is a much better option. Or send as your a url to pull from.
|
||||||
|
|
||||||
We also require you to provide a commit message entry with every patch,
|
We also require you to provide a commit message entry with every patch,
|
||||||
this describes in detail what the patch is doing.
|
that describes in detail what the patch is doing.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\section1 Code Constructs
|
\section1 Code Constructs
|
||||||
@@ -207,10 +208,168 @@ Only one declaration on each line.
|
|||||||
|
|
||||||
|
|
||||||
\section2 Formatting
|
\section2 Formatting
|
||||||
|
We are using the Qt Coding style, please follow the guidelines below.
|
||||||
|
|
||||||
|
Indentation
|
||||||
|
4 spaces, no tabs
|
||||||
|
|
||||||
|
Declaring variables
|
||||||
|
Declare each variable on a separate line
|
||||||
|
Avoid short (e.g., a,rbarr,nughdeget) names whenever possible
|
||||||
|
Single character variable names are only okay for counters and temporaries, where the purpose of the variable is obvious
|
||||||
|
Wait with declaring a variable until it is needed
|
||||||
|
|
||||||
|
Variables and functions start with a small letter. Each consecutive word in a variable's name starts with a capital letter
|
||||||
|
Avoid abbreviations
|
||||||
|
|
||||||
|
// Wrong
|
||||||
|
int a, b;
|
||||||
|
char *c, *d;
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
int height;
|
||||||
|
int width;
|
||||||
|
char *nameOfThis;
|
||||||
|
char *nameOfThat;
|
||||||
|
|
||||||
|
Whitespace
|
||||||
|
Use blank lines to group statements together where suited
|
||||||
|
Always use only one blank line
|
||||||
|
Always use a single space after a keyword, and before a curly brace.
|
||||||
|
|
||||||
|
// Wrong
|
||||||
|
if(foo){
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if (foo) {
|
||||||
|
}
|
||||||
|
|
||||||
|
For pointers or references, always use a single space before '*' or '&', but never after.
|
||||||
|
Avoid C-style casts when possible.
|
||||||
|
// Wrong
|
||||||
|
char* blockOfMemory = (char* ) malloc(data.size());
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
char *blockOfMemory = (char *)malloc(data.size());
|
||||||
|
char *blockOfMemory = reinterpret_cast<char *>(malloc(data.size()));
|
||||||
|
|
||||||
|
Braces
|
||||||
|
As a base rule, the left curly brace goes on the same line as the start of the statement:
|
||||||
|
// Wrong
|
||||||
|
if (codec)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if (codec) {
|
||||||
|
}
|
||||||
|
|
||||||
|
Exception: Function implementations and class declarations always have the left brace on the start of a line:
|
||||||
|
static void foo(int g)
|
||||||
|
{
|
||||||
|
qDebug("foo: %i", g);
|
||||||
|
}
|
||||||
|
|
||||||
|
class Moo
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
Use curly braces when the body of a conditional statement contains more than one line, and also if a single line statement is somewhat complex.
|
||||||
|
// Wrong
|
||||||
|
if (address.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; ++i) {
|
||||||
|
qDebug("%i", i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if (address.isEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; ++i)
|
||||||
|
qDebug("%i", i);
|
||||||
|
|
||||||
|
Exception 1: Use braces also if the parent statement covers several lines / wraps
|
||||||
|
// Correct
|
||||||
|
if (address.isEmpty() || !isValid()
|
||||||
|
|| !codec) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Exception 2: Use braces also in if-then-else blocks where either the if-code or the else-code covers several lines
|
||||||
|
// Wrong
|
||||||
|
if (address.isEmpty())
|
||||||
|
--it;
|
||||||
|
else {
|
||||||
|
qDebug("%s", qPrintable(address));
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if (address.isEmpty()) {
|
||||||
|
--it;
|
||||||
|
} else {
|
||||||
|
qDebug("%s", qPrintable(address));
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrong
|
||||||
|
if (a)
|
||||||
|
if (b)
|
||||||
|
...
|
||||||
|
else
|
||||||
|
...
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if (a) {
|
||||||
|
if (b)
|
||||||
|
...
|
||||||
|
else
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
Use curly braces when the body of a conditional statement is empty
|
||||||
|
// Wrong
|
||||||
|
while (a);
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
while (a) {}
|
||||||
|
|
||||||
|
Parentheses
|
||||||
|
Use parentheses to group expressions:
|
||||||
|
// Wrong
|
||||||
|
if (a && b || c)
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if ((a && b) || c)
|
||||||
|
|
||||||
|
// Wrong
|
||||||
|
a + b & c
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
(a + b) & c
|
||||||
|
|
||||||
|
Line breaks
|
||||||
|
Keep lines shorter than 100 characters; insert line breaks if necessary.
|
||||||
|
Commas go at the end of a broken line; operators start at the beginning of the new line. The operator is at the end of the line to avoid having to scroll if your editor is too narrow.
|
||||||
|
// Wrong
|
||||||
|
if (longExpression +
|
||||||
|
otherLongExpression +
|
||||||
|
otherOtherLongExpression) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correct
|
||||||
|
if (longExpression
|
||||||
|
+ otherLongExpression
|
||||||
|
+ otherOtherLongExpression) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Adapt the formatting of your code to the one used in the
|
|
||||||
other parts of Qt Creator. In case there is different formatting for
|
|
||||||
the same construct, use the one used more often.
|
|
||||||
|
|
||||||
|
|
||||||
\section2 Declarations
|
\section2 Declarations
|
||||||
@@ -228,6 +387,10 @@ Only one declaration on each line.
|
|||||||
- Avoid global or static variables.
|
- Avoid global or static variables.
|
||||||
|
|
||||||
|
|
||||||
|
\section2 API/ABI stability
|
||||||
|
We currently do not gurantee any API nor ABI compatibility between releases.
|
||||||
|
|
||||||
|
|
||||||
\section2 File headers
|
\section2 File headers
|
||||||
|
|
||||||
If you create a new file, the top of the file should include a
|
If you create a new file, the top of the file should include a
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
BIN
doc/qtcreator-build-issues.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 270 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 205 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 48 KiB |
BIN
doc/qtcreator-find-in-files.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
doc/qtcreator-locator-classes.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
doc/qtcreator-locator-current-project.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
doc/qtcreator-locator-customize.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator-locator-files.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
doc/qtcreator-locator-filesystem.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
doc/qtcreator-locator-help.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
doc/qtcreator-locator-line.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
doc/qtcreator-locator-magnify.png
Normal file
|
After Width: | Height: | Size: 526 B |
BIN
doc/qtcreator-locator-methods.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
doc/qtcreator-locator-opendocs.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
doc/qtcreator-locator-symbols.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
doc/qtcreator-locator.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 45 KiB |
@@ -33,8 +33,8 @@
|
|||||||
\o \bold{Qt Designer Integration}: User interface forms can be designed
|
\o \bold{Qt Designer Integration}: User interface forms can be designed
|
||||||
within Qt Creator. Simply double-click on a \c{.ui} file within the
|
within Qt Creator. Simply double-click on a \c{.ui} file within the
|
||||||
\gui{Project Explorer} to launch the integration.
|
\gui{Project Explorer} to launch the integration.
|
||||||
\o \bold{Navigation tools}: Powerful navigation tools let the user
|
\o \bold{Locator}: A powerful navigation tool that lets the user locate
|
||||||
navigate around files and classes with minimal keystrokes.
|
files and classes using minimal keystrokes.
|
||||||
\o \bold{Support for qmake's .pro file format}: The project's \c{.pro}
|
\o \bold{Support for qmake's .pro file format}: The project's \c{.pro}
|
||||||
file is used as a project description file.
|
file is used as a project description file.
|
||||||
\o \bold{Debugging Interface to GDB}: Applications can be debugged
|
\o \bold{Debugging Interface to GDB}: Applications can be debugged
|
||||||
@@ -50,15 +50,16 @@
|
|||||||
\o \l{Creating a Project in Qt Creator}
|
\o \l{Creating a Project in Qt Creator}
|
||||||
\o \l{Build Settings}
|
\o \l{Build Settings}
|
||||||
\o \l{Writing a Simple Program with Qt Creator}
|
\o \l{Writing a Simple Program with Qt Creator}
|
||||||
\o \l{Navigating Quickly Around Your Code}
|
\o \l{Navigating Quickly Around Your Code with Locator}
|
||||||
\o \l{Debugging with Qt Creator}
|
\o \l{Debugging with Qt Creator}
|
||||||
\o \l{Tips and Tricks}
|
\o \l{Tips and Tricks}
|
||||||
\o \l{Glossary}
|
\o \l{Glossary}
|
||||||
\o \l{Known Issues for Version 0.9 (Technical Preview)}
|
\o \l{Known Issues of Version 0.9 (Technical Preview)}
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\page creator-quick-tour.html
|
\page creator-quick-tour.html
|
||||||
@@ -114,7 +115,7 @@
|
|||||||
|
|
||||||
The task pane in Qt Creator can display one of four different panes:
|
The task pane in Qt Creator can display one of four different panes:
|
||||||
\gui{Build Issues}, \gui{Search Results}, \gui{Application Output}, and
|
\gui{Build Issues}, \gui{Search Results}, \gui{Application Output}, and
|
||||||
\gui{Compile}. These panes are available in all modes.
|
\gui{Compile Output}. These panes are available in all modes.
|
||||||
|
|
||||||
\section2 Build Issues
|
\section2 Build Issues
|
||||||
|
|
||||||
@@ -142,8 +143,8 @@
|
|||||||
|
|
||||||
\section2 Compile
|
\section2 Compile
|
||||||
|
|
||||||
The \gui{Compile} pane provides all the output from the compiler. In other
|
The \gui{Compile Output} pane provides all the output from the compiler. In
|
||||||
words, it is a more verbose version of information displayed in the
|
other words, it is a more verbose version of information displayed in the
|
||||||
\gui{Build Issues}
|
\gui{Build Issues}
|
||||||
|
|
||||||
\image qtcreator-compile-pane.png
|
\image qtcreator-compile-pane.png
|
||||||
@@ -168,19 +169,22 @@
|
|||||||
Qt Creator is fully integrated with Qt Designer to help you design user
|
Qt Creator is fully integrated with Qt Designer to help you design user
|
||||||
interface forms just like you would with the standalone version. The Qt
|
interface forms just like you would with the standalone version. The Qt
|
||||||
Designer integration also includes project management and code completion.
|
Designer integration also includes project management and code completion.
|
||||||
|
For more information on Qt Designer, you can refer to
|
||||||
|
\l{The Designer Manual}.
|
||||||
|
|
||||||
\image qtcreator-formedit.png
|
\image qtcreator-formedit.png
|
||||||
|
|
||||||
|
|
||||||
\section1 Keyboard Navigation
|
\section1 Keyboard Navigation
|
||||||
|
|
||||||
Even though Qt Creator can be used with a mouse, it also caters to the
|
Qt Creator caters not only to developers who are used to using the mouse,
|
||||||
needs of developers who are more comfortable with the keyboard. A wide
|
but also to developers who are more comfortable with the keyboard. A wide
|
||||||
range of \l{keyboard-shortcuts}{keyboard} and \l{Quick Navigation}
|
range of \l{keyboard-shortcuts}{keyboard} and
|
||||||
{navigation} shortcuts are available to help speed up the process of
|
\l{Navigating Quickly Around Your Code with Locator}{navigation} shortcuts
|
||||||
developing your application.
|
are available to help speed up the process of developing your application.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-quick-tour.html
|
\previouspage creator-quick-tour.html
|
||||||
@@ -191,37 +195,30 @@
|
|||||||
|
|
||||||
\table
|
\table
|
||||||
\row
|
\row
|
||||||
\i \bold{Warning:} Qt Creator currently supports qmake only.
|
\i \note Qt Creator currently supports \c qmake only. \c Makefile
|
||||||
Makefile and CMake support is not yet available.
|
and \c CMake support is currently unavailable.
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
To modify the build settings of your project, switch to the
|
To modify the build settings of your project, switch to the \gui{Projects}
|
||||||
\gui{Build & Run} mode using the mouse or by pressing \key{Ctrl+4}.
|
mode using the mouse or with \key{Ctrl+4}.
|
||||||
|
|
||||||
\image qtcreator-buildsettings.png
|
\image qtcreator-buildsettingstab.png
|
||||||
|
|
||||||
Action items to create, clone, or delete build configurations can be found
|
Action items to create, clone, or delete build configurations can be found
|
||||||
on the right of the dialog. You can have as many build configurations
|
at the bottom of the dialog. You can have as many build configurations as
|
||||||
as you need. By default Qt Creator creates a \bold{debug} and
|
needed. By default Qt Creator creates a \bold{debug} and \bold{release}
|
||||||
\bold{release} build configuration. Both these configurations use the
|
build configuration. Both these configurations use the
|
||||||
\l{glossary-default-qt}{Default Qt Version}.
|
\l{glossary-default-qt}{Default Qt Version}.
|
||||||
|
|
||||||
In the tree on the left, a list of build configurations and their settings
|
In the tree on the left, a list of build configurations and their settings
|
||||||
are displayed. The screenshot below shows the \bold{debug} and
|
are displayed. The screenshot above shows the \bold{debug} and
|
||||||
\bold{release} configurations and their corresponding settings:
|
\bold{release} configurations and their corresponding settings:
|
||||||
\bold{Build Environment} and \bold{Build Steps}.
|
\bold{Build Environment} and \bold{Build Steps}.
|
||||||
|
|
||||||
\image qtcreator-buildsettingstab.png
|
|
||||||
|
|
||||||
When you select a build configuration in the tree, a configuration page for
|
When you select a build configuration in the tree, a configuration page for
|
||||||
general build settings will be displayed. Here you can specify which
|
general build settings will be displayed. Here you can specify which
|
||||||
\l{glossary-project-qt}{Qt version} to use to build your project, whether
|
\l{glossary-project-qt}{Qt version} to use to build your project, whether
|
||||||
to \l{glossary-shadow-build}{shadow build} the project, and if a special
|
to \l{glossary-shadow-build}{shadow build} the project.
|
||||||
debugging helper is linked into the project or not.
|
|
||||||
|
|
||||||
The debugging helper enables the gdb integration to show the contents of
|
|
||||||
Qt data types. Enabling this option means that an additional file will be
|
|
||||||
compiled and linked to your project.
|
|
||||||
|
|
||||||
\image qtcreator-buildenvironment.png
|
\image qtcreator-buildenvironment.png
|
||||||
|
|
||||||
@@ -238,11 +235,14 @@
|
|||||||
\bold{Build Settings} page. Qt Creator will run the make command using the
|
\bold{Build Settings} page. Qt Creator will run the make command using the
|
||||||
correct Qt version.
|
correct Qt version.
|
||||||
|
|
||||||
\note The default qmake arguments \c{-after SOURCES*=gdbmacros.cpp
|
\note The \bold{Gdb Macros Build} step builds a small library along with your
|
||||||
-after QT*=network} are due to the debugging helper described above. If the
|
project that is used for the custom display of Qt and STL objects in the
|
||||||
|
integrated debugger. The library is created and built in a "qtc-gdbmacros"
|
||||||
|
subfolder of your project's main directory, and loaded dynamically into your
|
||||||
|
application if you run it in the debugger. If the
|
||||||
debugging helper seems to break your build or your application, you can
|
debugging helper seems to break your build or your application, you can
|
||||||
turn it off. You will still be able to debug applications, but the contents
|
remove the build step. You will still be able to debug applications, but the
|
||||||
of Qt data types will not be displayed properly.
|
contents of Qt and STL data types will not be displayed properly.
|
||||||
|
|
||||||
|
|
||||||
\section1 Qt Version Management
|
\section1 Qt Version Management
|
||||||
@@ -270,6 +270,7 @@
|
|||||||
\gui{Build Configuration}.
|
\gui{Build Configuration}.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-quick-tour.html
|
\previouspage creator-quick-tour.html
|
||||||
@@ -319,7 +320,7 @@
|
|||||||
|
|
||||||
Lastly, specify the name of the class you would like to create. The
|
Lastly, specify the name of the class you would like to create. The
|
||||||
\e{Header file}, \e{Source file} and \e{Form file} fields will update
|
\e{Header file}, \e{Source file} and \e{Form file} fields will update
|
||||||
themselves according to your choice of class name.
|
automatically according to your choice of class name.
|
||||||
|
|
||||||
You also have to select the base class for your class, either a
|
You also have to select the base class for your class, either a
|
||||||
QWidget, QDialog or QMainWindow, from the drop down box. Click
|
QWidget, QDialog or QMainWindow, from the drop down box. Click
|
||||||
@@ -328,6 +329,7 @@
|
|||||||
\endtable
|
\endtable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-creating-project.html
|
\previouspage creator-creating-project.html
|
||||||
@@ -516,95 +518,129 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-writing-program.html
|
\previouspage creator-writing-program.html
|
||||||
\page creator-navigation.html
|
\page creator-navigation.html
|
||||||
\nextpage creator-debugging.html
|
\nextpage creator-debugging.html
|
||||||
|
|
||||||
\title Navigating Quickly Around Your Code
|
\title Navigating Quickly Around Your Code with Locator
|
||||||
|
|
||||||
With Qt Creator, navigating to different locations in your project or on
|
With Qt Creator, navigating to different locations in your project or on
|
||||||
your disk, such as files, classes and methods, is trivial using the input
|
your disk, e.g., files, classes, methods, etc., is trivial using
|
||||||
field at the bottom left of the application window.
|
\gui Locator -- a smart line edit at the bottom left of Qt Creator's
|
||||||
|
window.
|
||||||
|
|
||||||
### SCREENSHOT
|
\image qtcreator-locator.png
|
||||||
|
|
||||||
To open for example the file \c{main.cpp} of your project, click into the
|
Suppose you would like to open your project's \c{main.cpp} file, click on
|
||||||
input field (or use \key{Ctrl+K} to get there), type the file name, and
|
\gui Locator or use \key{Ctrl+K}, type in the file name and then press
|
||||||
finally press the \key{Return} key. The file will open in the editor.
|
\key Return. The file will be opened in the editor. You can also type
|
||||||
You can also type only a part of a file name, and use the wildcard
|
part of a file name and use wildcard characters \c{*} and \c{?} to match
|
||||||
characters \c{*} and \c{?} which match \c{any number of any characters} and
|
\e{any} number of \e{any} characters. A list of all files matching your
|
||||||
\c{any single character}, respectively - you will get a list of all matching
|
criteria will be displayed.
|
||||||
files to choose from.
|
|
||||||
|
\gui Locator not only allows you to navigate files on disk but also other
|
||||||
|
"locations", which are organized with \bold{Filters}. Currently there are
|
||||||
|
filters for:
|
||||||
|
|
||||||
As mentioned above, files are not the only type of locations you can
|
|
||||||
jump to. The different types of locations are organized in what we
|
|
||||||
call \c{filters}. There are filters for jumping to
|
|
||||||
\list
|
\list
|
||||||
\o files mentioned in your \c{.pro} files, such as source and header,
|
\o files anywhere on your hard disk (browsing through the file system),
|
||||||
resource and \c{.ui} files,
|
\o files from a subdirectory structure defined by you,
|
||||||
\o a specific line in your current text document,
|
\o files mentioned in your \c{.pro} files, such as source, header,
|
||||||
|
resource, and \c{.ui} files,
|
||||||
|
\o any open document,
|
||||||
\o class and method definitions in your project or anywhere referenced
|
\o class and method definitions in your project or anywhere referenced
|
||||||
from your project,
|
from your project,
|
||||||
\o help topics, including the Qt API reference documentation,
|
\o help topics, including Qt's documentation, and,
|
||||||
\o files anywhere on your hard disk (by browsing through the file system),
|
\o a specific line in the document displayed on your editor,
|
||||||
\o any open document,
|
|
||||||
\o files from a subdirectory structure you define.
|
|
||||||
\endlist
|
\endlist
|
||||||
Some of these filters are not used by default if you just start typing in the
|
|
||||||
input field, but require you to type a "prefix" in front, that is
|
|
||||||
assigned to that filter. The prefix is usually a single character,
|
Some of these filters require you to activate them by typing an assigned
|
||||||
followed by a space. As an example, to jump to the definition of the class
|
\e prefix. This prefix is usually a single character followed by
|
||||||
\c{QDataStream} type \key{Ctrl+K}, \key{:}, \key{Space}, and the class name.
|
\key{Space}. For example, to jump to the definition of the class
|
||||||
You find a full list of filters and their prefixes below.
|
\l{http://doc.trolltech.com/qdatastream.html}{QDataStream}, type:
|
||||||
|
\key{Ctrl+K} to activate \gui Locator. Then type colon (\key{:}) followed
|
||||||
|
by \key{Space} and the class name.
|
||||||
|
|
||||||
|
|
||||||
|
Below is a full list of \l{http://doc.trolltech.com/qdatastream.html}
|
||||||
|
{QDataStream} related output:
|
||||||
|
|
||||||
\image qtcreator-navigate-popup.png
|
\image qtcreator-navigate-popup.png
|
||||||
|
|
||||||
You can add filters that provide quick navigation to files in a
|
|
||||||
subdirectory structure that you define. This way you have quick access to
|
Filters can be added to provide quick navigation around files in a
|
||||||
files that are not directly mentioned in your project, but still relate to it.
|
subdirectory structure defined by you. This way, you can acccess files you
|
||||||
Click on the little magnifier glass in the input field and choose
|
need, that are not directly mentioned in your project. Click on
|
||||||
\gui{Configure...} from the menu that appears. This opens the preferences
|
\image qtcreator-locator-magnify.png
|
||||||
dialog for navigation filters. Click the \gui{Add} button to create a new
|
and choose \gui{Configure...} from the menu displayed.
|
||||||
filter. Give it a name, choose directories, set (a comma separated list of)
|
|
||||||
file patterns, and give it a prefix string. After closing the preferences
|
\image qtcreator-locator-customize.png
|
||||||
dialog the directories you specified are searched for files that match the
|
|
||||||
file patterns, and the information is cached. From now on you can jump to
|
This then displays the \gui Preferences dialog (\gui Options on Mac Os X)
|
||||||
these files by just typing part of the file name into the navigation input
|
for navigation filters. Click \gui Add to create a new filter. In the
|
||||||
field. You can force an update of the cached information about the files via
|
\gui{Filter Configuration} dialog below, give your filter a name, select
|
||||||
the \gui{Refresh} menu item in the magnifier menu.
|
your preferred directories, set file patterns with a comma separated list,
|
||||||
|
and specify a prefix string.
|
||||||
|
|
||||||
\image qtcreator-navigate-customfilter.png
|
\image qtcreator-navigate-customfilter.png
|
||||||
|
|
||||||
The following table gives an overview on the currently available filters:
|
After closing this dialog, \gui Locator will search the directories you
|
||||||
|
selected for files matching your file patterns, and the information will be
|
||||||
|
cached. Click \gui Refresh from the menu above to update the cached
|
||||||
|
information.
|
||||||
|
|
||||||
|
The following table lists the filters currently available:
|
||||||
|
|
||||||
\table
|
\table
|
||||||
\header
|
\header
|
||||||
\o Function
|
\o Function
|
||||||
\o Key Combination
|
\o Key Combination
|
||||||
|
\o Screenshot
|
||||||
\row
|
\row
|
||||||
\o Go to a Line in the Current Document
|
\o Go to a line in the current document
|
||||||
\o Ctrl + K, l, Space, and the line number
|
\o Ctrl+K, l, Space, and the line number
|
||||||
|
\o \image qtcreator-locator-line.png
|
||||||
\row
|
\row
|
||||||
\o Go to a Function Definitions
|
\o Go to a symbol definition
|
||||||
\o Ctrl + K, :, Space, and the function name
|
\o Ctrl+K, :, Space, and the function name
|
||||||
|
\o \image qtcreator-locator-symbols.png
|
||||||
\row
|
\row
|
||||||
\o Go to a Help Topic
|
\o Go to a help topic
|
||||||
\o Ctrl + K, ?, Space, and the topic
|
\o Ctrl+K, ?, Space, and the topic
|
||||||
|
\o \image qtcreator-locator-help.png
|
||||||
\row
|
\row
|
||||||
\o Go to an Already Opened Document
|
\o Go to an opened document
|
||||||
\o Ctrl + K, o, Space, and the document name.
|
\o Ctrl+K, o, Space, and the document name.
|
||||||
|
\o \image qtcreator-locator-opendocs.png
|
||||||
\row
|
\row
|
||||||
\o Go to a File in the File System (browsing the file system)
|
\o Go to a file in the file system (browse the file system)
|
||||||
\o Ctrl + K, f, Space, and the file name.
|
\o Ctrl+K, f, Space, and the file name.
|
||||||
|
\o \image qtcreator-locator-filesystem.png
|
||||||
\row
|
\row
|
||||||
\o Go to a File in any Loaded Project
|
\o Go to a file in any project currently loaded
|
||||||
\o Ctrl + K, a, Space, and the function name.
|
\o Ctrl+K, a, Space, and the function name.
|
||||||
|
\o \image qtcreator-locator-files.png
|
||||||
\row
|
\row
|
||||||
\o Go to a File in the Current Project
|
\o Go to a file in the current project
|
||||||
\o Ctrl + K, p, Space, and the function name.
|
\o Ctrl+K, p, Space, and the function name.
|
||||||
|
\o \image qtcreator-locator-current-project.png
|
||||||
|
\row
|
||||||
|
\o Go to a class definition
|
||||||
|
\o Ctrl+K, c, Space, and the class name.
|
||||||
|
\o \image qtcreator-locator-classes.png
|
||||||
|
\row
|
||||||
|
\o Go to a method definition
|
||||||
|
\o Ctrl+K, m, Space, and the class name.
|
||||||
|
\o \image qtcreator-locator-methods.png
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
\note By default, if you press \key{Ctrl+K} and do not use a prefix to
|
||||||
|
specify a filter, three filters will be enabled: \c{o}, \c{l}, and \c{a}.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -734,11 +770,9 @@
|
|||||||
To finish debugging, Press \key{Shift+F5}. A line of code can be executed
|
To finish debugging, Press \key{Shift+F5}. A line of code can be executed
|
||||||
as a whole with \key F10; to execute a function or a sub-function, use
|
as a whole with \key F10; to execute a function or a sub-function, use
|
||||||
\key F11. Alternatively, you can continue running the program with \key F5.
|
\key F11. Alternatively, you can continue running the program with \key F5.
|
||||||
|
It is possible to continue executing your program until the current
|
||||||
###REWORD
|
function completes or jump to an arbitrary position in the current
|
||||||
There is also the possibility to continue execution until the current
|
function.
|
||||||
function finishes, or, for advanced use, to jump to an arbitrary
|
|
||||||
possition in the current function.
|
|
||||||
|
|
||||||
|
|
||||||
\section2 Stack
|
\section2 Stack
|
||||||
@@ -765,7 +799,6 @@
|
|||||||
|
|
||||||
\section2 Threads
|
\section2 Threads
|
||||||
|
|
||||||
|
|
||||||
If a multi-threaded program is stopped, the \gui Thread view or the
|
If a multi-threaded program is stopped, the \gui Thread view or the
|
||||||
combobox named \gui Thread in the debugger's status bar can be used to
|
combobox named \gui Thread in the debugger's status bar can be used to
|
||||||
switch from one thread to another. The \gui Stack view will adjust itself
|
switch from one thread to another. The \gui Stack view will adjust itself
|
||||||
@@ -828,30 +861,25 @@
|
|||||||
\section2 Modules
|
\section2 Modules
|
||||||
|
|
||||||
By default, the \gui Modules view is hidden as it is only useful with the
|
By default, the \gui Modules view is hidden as it is only useful with the
|
||||||
experimental delayed debug information loading feature. You can turn this
|
experimental delayed loaing of debug information feature. You can turn
|
||||||
feature on by selecting \gui{Fast Debugger Start}
|
this feature on by selecting \gui{Fast Debugger Start}
|
||||||
|
|
||||||
|
|
||||||
|
With this feature, debug information from the Qt library itself is not
|
||||||
|
loaded when the application starts up, thereby reducing the startup times
|
||||||
|
for some applications. You can then use the \gui Modules view to manually
|
||||||
|
load this information, if required.
|
||||||
|
|
||||||
|
\note In this scenario, some breakpoints may not be set by the debugger.
|
||||||
|
|
||||||
The \gui Modules view is hidden by default and only useful in
|
|
||||||
connection with the experimental feature of delayed debug
|
|
||||||
information loading. This feature is accessible by selecting
|
|
||||||
\gui{Debug} and \gui{Fast Debugger Start}. When using the
|
|
||||||
feature, debug information coming from the Qt library itself
|
|
||||||
are not loaded on application startup, thereby reducing the
|
|
||||||
startup times for some applications. The \gui{Modules View}
|
|
||||||
can then be used to load this information manually if needed.
|
|
||||||
Note that the debugger may fail to set some breakpoints in
|
|
||||||
this scenarios.
|
|
||||||
|
|
||||||
\section2 Disassembler View and Registers View
|
\section2 Disassembler View and Registers View
|
||||||
|
|
||||||
Both the \gui{Disassembler View} and \gui{Registers View} are hidden
|
By default, both the \gui Disassembler and \gui Registers view are hidden.
|
||||||
by default. The former shows the disassembled code of the current
|
The \gui Disassembler view displays disassembled code for the current
|
||||||
function, the latter the current state of the CPU registers.
|
function; the \gui Registers view displays the current state of the CPU's
|
||||||
Both views are mainly useful in connection with the low-level
|
registers. Both views are useful for low-level commands such as
|
||||||
\gui{Step single instruction} and \gui{Step over single instruction}
|
\gui{Step Single Instruction} and \gui{Step Over Single Instruction}.
|
||||||
commands.
|
|
||||||
|
|
||||||
\section1 A Walkthrough for the Debugger Frontend
|
\section1 A Walkthrough for the Debugger Frontend
|
||||||
|
|
||||||
@@ -974,6 +1002,7 @@
|
|||||||
the low-level structures visible again.
|
the low-level structures visible again.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-tips.html
|
\previouspage creator-tips.html
|
||||||
@@ -1017,6 +1046,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-glossary.html
|
\previouspage creator-glossary.html
|
||||||
@@ -1031,84 +1061,71 @@
|
|||||||
\header
|
\header
|
||||||
\o Function
|
\o Function
|
||||||
\o Key Combination
|
\o Key Combination
|
||||||
|
|
||||||
\row
|
\row
|
||||||
\o Activate Build & Run Mode
|
\o Activate \gui Welcome mode
|
||||||
\o Ctrl + 4
|
\o Ctrl + 1
|
||||||
\row
|
\row
|
||||||
\o Activate Debug Mode
|
\o Activate \gui Edit mode
|
||||||
\o Ctrl + 3
|
|
||||||
\row
|
|
||||||
\o Activate Edit Mode
|
|
||||||
\o Ctrl + 2
|
\o Ctrl + 2
|
||||||
\row
|
\row
|
||||||
\o Activate Help Mode
|
\o Activate \gui Debug mode
|
||||||
|
\o Ctrl + 3
|
||||||
|
\row
|
||||||
|
\o Activate \gui Projects mode
|
||||||
|
\o Ctrl + 4
|
||||||
|
\row
|
||||||
|
\o Activate \gui Help mode
|
||||||
\o Ctrl + 5
|
\o Ctrl + 5
|
||||||
\row
|
\row
|
||||||
\o Activate Output Mode
|
\o Activate \gui Output mode
|
||||||
\o Ctrl + 6
|
\o Ctrl + 6
|
||||||
\row
|
|
||||||
\o Activate Welcome Mode
|
|
||||||
\o Ctrl + 1
|
|
||||||
\row
|
\row
|
||||||
\o Find
|
\o Find
|
||||||
\o Ctrl + F
|
\o Ctrl + F
|
||||||
\row
|
\row
|
||||||
\o Find Next
|
\o Find next
|
||||||
\o F3
|
\o F3
|
||||||
\row
|
\row
|
||||||
\o Go back to Code Editor (May require more than one press)
|
\o Go back to the code editor (\gui Edit mode: The first press
|
||||||
|
gives the editor focus, without closing secondary windows; the
|
||||||
|
second press closes all secondary windows. \gui Debug mode or
|
||||||
|
\gui Help mode: Switch to \gui Edit mode.)
|
||||||
\o Esc
|
\o Esc
|
||||||
\row
|
\row
|
||||||
\o Go to a Line
|
\o Go to a line
|
||||||
\o Ctrl + L
|
\o Ctrl + L
|
||||||
\row
|
\row
|
||||||
\o Start Debugging
|
\o Start debugging
|
||||||
\o F5
|
\o F5
|
||||||
\row
|
\row
|
||||||
\o Stop Debugging
|
\o Stop debugging
|
||||||
\o Shift + F5
|
\o Shift + F5
|
||||||
\row
|
\row
|
||||||
\o Toggle Application Output
|
\o Toggle code declaration and definition
|
||||||
\o Alt + 3
|
|
||||||
\row
|
|
||||||
\o Toggle Code Declaration and Definition
|
|
||||||
\o F2
|
\o F2
|
||||||
\row
|
\row
|
||||||
\o Toggle Header File and Source File
|
\o Toggle header file and source file
|
||||||
\o F4
|
\o F4
|
||||||
\row
|
\row
|
||||||
\o Toggle Side Bar
|
\o Toggle Side Bar
|
||||||
\o Alt + 0
|
\o Alt + 0
|
||||||
\row
|
\row
|
||||||
\o Toggle Task List
|
\o Toggle \gui{Build Issues} pane
|
||||||
\o Alt + 1
|
\o Alt + 1
|
||||||
\row
|
\row
|
||||||
\o Toggle Search Results
|
\o Toggle \gui{Search Results} pane
|
||||||
\o Alt + 2
|
\o Alt + 2
|
||||||
\row
|
\row
|
||||||
\o Toggle Compile Output
|
\o Toggle \gui{Application Output} pane
|
||||||
|
\o Alt + 3
|
||||||
|
\row
|
||||||
|
\o Toggle \gui{Compile Output} pane
|
||||||
\o Alt + 4
|
\o Alt + 4
|
||||||
\row
|
|
||||||
\o Select Welcome Mode
|
|
||||||
\o Ctrl + 1
|
|
||||||
\row
|
|
||||||
\o Select Edit Mode
|
|
||||||
\o Ctrl + 2
|
|
||||||
\row
|
|
||||||
\o Select Debug Mode
|
|
||||||
\o Ctrl + 3
|
|
||||||
\row
|
|
||||||
\o Select Build & Run Mode
|
|
||||||
\o Ctrl + 4
|
|
||||||
\row
|
|
||||||
\o Select Help Mode
|
|
||||||
\o Ctrl + 5
|
|
||||||
\row
|
|
||||||
\o Select Output Mode
|
|
||||||
\o Ctrl + 6
|
|
||||||
\endtable
|
\endtable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\contentspage index.html
|
\contentspage index.html
|
||||||
\previouspage creator-keyboard-shortcuts.html
|
\previouspage creator-keyboard-shortcuts.html
|
||||||
@@ -1122,38 +1139,38 @@
|
|||||||
\list
|
\list
|
||||||
\o The central editor sometimes loses it "changed" status marker.
|
\o The central editor sometimes loses it "changed" status marker.
|
||||||
|
|
||||||
\o There is a kernel bug essentially making debugging unreliable
|
\o There is a kernel bug essentially making debugging unreliable on
|
||||||
on 2.6.24 kernels for i386 (which is, unfortunately, the default
|
2.6.24 kernels for i386 (which is, unfortunately, the default on
|
||||||
on Ubuntu 8.04).
|
Ubuntu 8.04). See
|
||||||
See \l{https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/230315/}
|
\l{https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/230315/} for
|
||||||
for details.
|
details. The only solution to this problem is to boot another
|
||||||
The only solution for this problem is to boot another kernel.
|
kernel.
|
||||||
|
|
||||||
\o gdb sometimes takes very long to load debugging symbol,
|
\o Gdb may take long to load debugging symbols, especially from large
|
||||||
especially from big libraries like libQtWebKit. Starting debugging
|
libraries like \c libQtWebKit. Starting the debugging module can
|
||||||
can take up to several minutes without visible progress.
|
take up to several minutes without visible progress.
|
||||||
|
|
||||||
\o Paths or file names containing spaces or special characters like colons,
|
\o Paths or file names containing spaces or special characters, e.g.,
|
||||||
dollar signs, hash marks etc. may create difficulties.
|
colons, dollar signs, hash marks etc. may cause difficulties. This
|
||||||
Some of the tools Qt Creator uses in the background to do the "real
|
is because some of the tools Qt Creator uses in the background have
|
||||||
work" have restrictions on the characters that are allowed in file
|
restrictions on the characters allowed in file and directory names.
|
||||||
and directory names. To be on the safe side, it is strongly
|
To be on the safe side, we recomment creating projects and project
|
||||||
recommended to create projects and project items only with names
|
items with names consisting of plain characters, numbers,
|
||||||
consisting of plain characters, numbers, underscores, and hyphens.
|
underscores, and hyphens.
|
||||||
|
|
||||||
\o \c .pro files are reformatted if files are added/removed.
|
\o \c{.pro} files are reformatted if files have been added or removed.
|
||||||
Whitespace is not preserved.
|
Whitespace is not preserved.
|
||||||
|
|
||||||
\o No IDE support for adding files to include (\c .pri) files.
|
\o There is no IDE support for adding files to include (\c .pri) files.
|
||||||
|
|
||||||
\o No IDE support for adding/removing sub-projects.
|
\o There is no IDE support for adding/removing sub-projects. Project
|
||||||
Project hierarchies (SUBDIRS template) have to be created by hand.
|
hierarchies (SUBDIRS template) have to be created manually.
|
||||||
|
|
||||||
\o The file system sidebar does not update automatically.
|
\o The file system sidebar does not update automatically. As a
|
||||||
As a workaround you can switch to another directory and then back.
|
workaround, switch to another directory and then back.
|
||||||
|
|
||||||
\o The resource system of the embedded version of Qt Designer
|
\o The resource system of the embedded version of Qt Designer does not
|
||||||
does not interact with the project management.
|
interact with the project manager.
|
||||||
|
|
||||||
\o Loading KDE4 designer plugins breaks the style, due to a bug in KDE.
|
\o Loading KDE4 designer plugins breaks the style, due to a bug in KDE.
|
||||||
\endlist
|
\endlist
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ win32 {
|
|||||||
}
|
}
|
||||||
linux-* {
|
linux-* {
|
||||||
LIBS *= -lExtensionSystem -lAggregation
|
LIBS *= -lExtensionSystem -lAggregation
|
||||||
|
QMAKE_FLAGS+=-Wl,--enable-new-dtags
|
||||||
}
|
}
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|||||||
@@ -283,3 +283,4 @@ int main(int argc, char **argv)
|
|||||||
QTimer::singleShot(100, &pluginManager, SLOT(startTests()));
|
QTimer::singleShot(100, &pluginManager, SLOT(startTests()));
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,16 +268,14 @@ bool EditorGroup::restoreState(const QByteArray &state)
|
|||||||
EditorManager *em = EditorManager::instance();
|
EditorManager *em = EditorManager::instance();
|
||||||
EditorList editors;
|
EditorList editors;
|
||||||
in >> editors;
|
in >> editors;
|
||||||
IEditor *currentEditor = 0;
|
|
||||||
IEditor *editor;
|
|
||||||
int savedIndex = editors.currentEditorIndex;
|
int savedIndex = editors.currentEditorIndex;
|
||||||
|
if (savedIndex >= 0 && savedIndex < editors.count())
|
||||||
|
em->restoreEditor(editors.fileNameAt(savedIndex), editors.editorKindAt(savedIndex), this);
|
||||||
for (int j = 0; j < editors.count(); ++j) {
|
for (int j = 0; j < editors.count(); ++j) {
|
||||||
editor = em->restoreEditor(editors.fileNameAt(j), editors.editorKindAt(j), this);
|
|
||||||
if (j == savedIndex)
|
if (j == savedIndex)
|
||||||
currentEditor = editor;
|
continue;
|
||||||
|
em->restoreEditor(editors.fileNameAt(j), editors.editorKindAt(j), this);
|
||||||
}
|
}
|
||||||
if (currentEditor)
|
|
||||||
setCurrentEditor(currentEditor);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,8 +98,6 @@ void FancyTabBar::paintEvent(QPaintEvent *event)
|
|||||||
|
|
||||||
// paint active tab last, since it overlaps the neighbors
|
// paint active tab last, since it overlaps the neighbors
|
||||||
paintTab(&p, currentIndex());
|
paintTab(&p, currentIndex());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle hover events for mouse fade ins
|
// Handle hover events for mouse fade ins
|
||||||
|
|||||||
@@ -151,20 +151,18 @@ class Debugger::Internal::LocationMark
|
|||||||
public:
|
public:
|
||||||
LocationMark(const QString &fileName, int linenumber)
|
LocationMark(const QString &fileName, int linenumber)
|
||||||
: BaseTextMark(fileName, linenumber)
|
: BaseTextMark(fileName, linenumber)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
~LocationMark();
|
~LocationMark();
|
||||||
|
|
||||||
QIcon icon() const;
|
QIcon icon() const;
|
||||||
void updateLineNumber(int /*lineNumber*/) {}
|
void updateLineNumber(int /*lineNumber*/) {}
|
||||||
void updateBlock(const QTextBlock & /*block*/) {}
|
void updateBlock(const QTextBlock & /*block*/) {}
|
||||||
void removedFromEditor() { deleteLater(); }
|
void removedFromEditor() {}
|
||||||
private:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
LocationMark::~LocationMark()
|
LocationMark::~LocationMark()
|
||||||
{
|
{
|
||||||
//qDebug() << "LOCATIONMARK DESTRUCTOR" << m_editor;
|
//qDebug() << "LOCATIONMARK DESTRUCTOR";
|
||||||
}
|
}
|
||||||
|
|
||||||
QIcon LocationMark::icon() const
|
QIcon LocationMark::icon() const
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ SUBDIRS = plugin_coreplugin \
|
|||||||
# plugin_regexp \ # don't know what to do with this
|
# plugin_regexp \ # don't know what to do with this
|
||||||
plugin_qtscripteditor \
|
plugin_qtscripteditor \
|
||||||
plugin_cpaster \
|
plugin_cpaster \
|
||||||
plugin_cmakeprojectmanager
|
# plugin_cmakeprojectmanager
|
||||||
|
|
||||||
# These two plugins require private headers from Qt and therefore don't work
|
# These two plugins require private headers from Qt and therefore don't work
|
||||||
# with an installed/released version of Qt.
|
# with an installed/released version of Qt.
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
CompileOutputWindow(BuildManager *bm);
|
CompileOutputWindow(BuildManager *bm);
|
||||||
QWidget *outputWidget(QWidget *);
|
QWidget *outputWidget(QWidget *);
|
||||||
QList<QWidget*> toolBarWidgets(void) const { return QList<QWidget *>(); }
|
QList<QWidget*> toolBarWidgets(void) const { return QList<QWidget *>(); }
|
||||||
QString name() const { return tr("Compile"); }
|
QString name() const { return tr("Compile Output"); }
|
||||||
int priorityInStatusBar() const;
|
int priorityInStatusBar() const;
|
||||||
void clearContents();
|
void clearContents();
|
||||||
void visibilityChanged(bool visible);
|
void visibilityChanged(bool visible);
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ QModelIndex EnvironmentModel::addVariable(const EnvironmentItem &item)
|
|||||||
rowInResult = findInResultInsertPosition(item.name);
|
rowInResult = findInResultInsertPosition(item.name);
|
||||||
int rowInChanges = findInChangesInsertPosition(item.name);
|
int rowInChanges = findInChangesInsertPosition(item.name);
|
||||||
|
|
||||||
qDebug()<<"addVariable "<<item.name<<existsInBaseEnvironment<<rowInResult<<rowInChanges;
|
//qDebug() << "addVariable " << item.name << existsInBaseEnvironment << rowInResult << rowInChanges;
|
||||||
|
|
||||||
if (existsInBaseEnvironment) {
|
if (existsInBaseEnvironment) {
|
||||||
m_items.insert(rowInChanges, item);
|
m_items.insert(rowInChanges, item);
|
||||||
|
|||||||
@@ -406,16 +406,6 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
|||||||
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
|
msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
// recent projects menu
|
|
||||||
Core::IActionContainer *mrecent =
|
|
||||||
am->createMenu(Constants::M_RECENTPROJECTS);
|
|
||||||
mrecent->menu()->setTitle("Recent Projects");
|
|
||||||
mfile->addMenu(mrecent, Core::Constants::G_FILE_PROJECT);
|
|
||||||
connect(mfile->menu(), SIGNAL(aboutToShow()),
|
|
||||||
this, SLOT(updateRecentProjectMenu()));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Default open action
|
// Default open action
|
||||||
m_openFileAction = new QAction(tr("Open File"), this);
|
m_openFileAction = new QAction(tr("Open File"), this);
|
||||||
cmd = am->registerAction(m_openFileAction, ProjectExplorer::Constants::OPENFILE,
|
cmd = am->registerAction(m_openFileAction, ProjectExplorer::Constants::OPENFILE,
|
||||||
@@ -425,6 +415,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList & /*arguments*/, QStrin
|
|||||||
// Open With menu
|
// Open With menu
|
||||||
mfilec->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN);
|
mfilec->addMenu(openWith, ProjectExplorer::Constants::G_FILE_OPEN);
|
||||||
|
|
||||||
|
// recent projects menu
|
||||||
|
Core::IActionContainer *mrecent =
|
||||||
|
am->createMenu(Constants::M_RECENTPROJECTS);
|
||||||
|
mrecent->menu()->setTitle("Recent Projects");
|
||||||
|
mfile->addMenu(mrecent, Core::Constants::G_FILE_OPEN);
|
||||||
|
connect(mfile->menu(), SIGNAL(aboutToShow()),
|
||||||
|
this, SLOT(updateRecentProjectMenu()));
|
||||||
|
|
||||||
// unload action
|
// unload action
|
||||||
m_unloadAction = new QAction(tr("Unload Project"), this);
|
m_unloadAction = new QAction(tr("Unload Project"), this);
|
||||||
cmd = am->registerAction(m_unloadAction, Constants::UNLOAD, globalcontext);
|
cmd = am->registerAction(m_unloadAction, Constants::UNLOAD, globalcontext);
|
||||||
@@ -1498,8 +1496,7 @@ void ProjectExplorerPlugin::openRecentProject()
|
|||||||
QAction *a = qobject_cast<QAction*>(sender());
|
QAction *a = qobject_cast<QAction*>(sender());
|
||||||
if (m_recentProjectsActions.contains(a)) {
|
if (m_recentProjectsActions.contains(a)) {
|
||||||
const QString fileName = m_recentProjectsActions.value(a);
|
const QString fileName = m_recentProjectsActions.value(a);
|
||||||
if (ProjectFileFactory *pf = findProjectFileFactory(fileName))
|
openProject(fileName);
|
||||||
pf->open(fileName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -700,7 +700,6 @@ void Qt4ProFileNode::update()
|
|||||||
|
|
||||||
void Qt4ProFileNode::fileChanged(const QString &filePath)
|
void Qt4ProFileNode::fileChanged(const QString &filePath)
|
||||||
{
|
{
|
||||||
qDebug()<<"+++++"<<filePath;
|
|
||||||
CppTools::CppModelManagerInterface *modelManager =
|
CppTools::CppModelManagerInterface *modelManager =
|
||||||
ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
|
ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
|
||||||
|
|
||||||
|
|||||||
@@ -621,7 +621,22 @@ void Qt4Project::addDefaultBuild()
|
|||||||
// Restoring configuration
|
// Restoring configuration
|
||||||
// Do we already have a gdbmacrobuildstep?
|
// Do we already have a gdbmacrobuildstep?
|
||||||
// If not add it and disable linking of debugging helper
|
// If not add it and disable linking of debugging helper
|
||||||
// TODO
|
|
||||||
|
// Check for old link debugging helper setting in each buildConfiguration
|
||||||
|
// We add a gdbmacrosbuildstep if at least one has it
|
||||||
|
// TODO remove migration code from pre beta
|
||||||
|
foreach(const QString &bc, buildConfigurations()) {
|
||||||
|
QVariant v = value(bc, "addQDumper");
|
||||||
|
if (v.isValid() && v.toBool()) {
|
||||||
|
GdbMacrosBuildStep *gdbmacrostep = new GdbMacrosBuildStep(this);
|
||||||
|
insertBuildStep(0, gdbmacrostep);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(const QString &bc, buildConfigurations()) {
|
||||||
|
setValue(bc, "addQDumper", QVariant());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1022,7 +1022,7 @@ Core::ICore *SubversionPlugin::coreInstance()
|
|||||||
|
|
||||||
SubversionPlugin *SubversionPlugin::subversionPluginInstance()
|
SubversionPlugin *SubversionPlugin::subversionPluginInstance()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_subversionPluginInstance, m_subversionPluginInstance);
|
QTC_ASSERT(m_subversionPluginInstance, return m_subversionPluginInstance);
|
||||||
return m_subversionPluginInstance;
|
return m_subversionPluginInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2283,10 +2283,12 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!userData->ifdefedOut()) {
|
||||||
collapseAfter = (userData->collapseMode() == TextBlockUserData::CollapseAfter);
|
collapseAfter = (userData->collapseMode() == TextBlockUserData::CollapseAfter);
|
||||||
collapseThis = (userData->collapseMode() == TextBlockUserData::CollapseThis);
|
collapseThis = (userData->collapseMode() == TextBlockUserData::CollapseThis);
|
||||||
hasClosingCollapse = userData->hasClosingCollapse() && (previousBraceDepth > 0);
|
hasClosingCollapse = userData->hasClosingCollapse() && (previousBraceDepth > 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (d->m_codeFoldingVisible) {
|
if (d->m_codeFoldingVisible) {
|
||||||
const QRect box(extraAreaWidth + collapseBoxWidth/4, top + collapseBoxWidth/4,
|
const QRect box(extraAreaWidth + collapseBoxWidth/4, top + collapseBoxWidth/4,
|
||||||
@@ -2318,10 +2320,12 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
|
|||||||
|
|
||||||
bool collapseNext = nextBlockUserData
|
bool collapseNext = nextBlockUserData
|
||||||
&& nextBlockUserData->collapseMode()
|
&& nextBlockUserData->collapseMode()
|
||||||
== TextBlockUserData::CollapseThis;
|
== TextBlockUserData::CollapseThis
|
||||||
|
&& !nextBlockUserData->ifdefedOut();
|
||||||
|
|
||||||
bool nextHasClosingCollapse = nextBlockUserData
|
bool nextHasClosingCollapse = nextBlockUserData
|
||||||
&& nextBlockUserData->hasClosingCollapseInside();
|
&& nextBlockUserData->hasClosingCollapseInside()
|
||||||
|
&& nextBlockUserData->ifdefedOut();
|
||||||
|
|
||||||
bool drawBox = ((collapseAfter || collapseNext) && !nextHasClosingCollapse);
|
bool drawBox = ((collapseAfter || collapseNext) && !nextHasClosingCollapse);
|
||||||
|
|
||||||
@@ -2473,17 +2477,22 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
|
|||||||
extraAreaWidth(&markWidth);
|
extraAreaWidth(&markWidth);
|
||||||
|
|
||||||
if (e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking
|
if (e->type() == QEvent::MouseMove && e->buttons() == 0) { // mouse tracking
|
||||||
int highlightBlockNumber = d->extraAreaHighlightCollapseBlockNumber;
|
// Update which folder marker is highlighted
|
||||||
|
const int highlightBlockNumber = d->extraAreaHighlightCollapseBlockNumber;
|
||||||
d->extraAreaHighlightCollapseBlockNumber = -1;
|
d->extraAreaHighlightCollapseBlockNumber = -1;
|
||||||
if (TextBlockUserData::canCollapse(cursor.block())
|
|
||||||
|
if (d->m_codeFoldingVisible
|
||||||
|
&& TextBlockUserData::canCollapse(cursor.block())
|
||||||
&& !TextBlockUserData::hasClosingCollapseInside(cursor.block().next())
|
&& !TextBlockUserData::hasClosingCollapseInside(cursor.block().next())
|
||||||
&& collapseBox(cursor.block()).contains(e->pos()))
|
&& collapseBox(cursor.block()).contains(e->pos()))
|
||||||
d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber();
|
d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber();
|
||||||
|
|
||||||
|
// Set whether the mouse cursor is a hand or normal arrow
|
||||||
bool hand = (e->pos().x() <= markWidth || d->extraAreaHighlightCollapseBlockNumber >= 0);
|
bool hand = (e->pos().x() <= markWidth || d->extraAreaHighlightCollapseBlockNumber >= 0);
|
||||||
if (hand != (d->m_extraArea->cursor().shape() == Qt::PointingHandCursor))
|
if (hand != (d->m_extraArea->cursor().shape() == Qt::PointingHandCursor))
|
||||||
d->m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor);
|
d->m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor);
|
||||||
|
|
||||||
|
// Start fading in or out the highlighted folding marker
|
||||||
if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber) {
|
if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber) {
|
||||||
d->extraAreaTimeLine->stop();
|
d->extraAreaTimeLine->stop();
|
||||||
d->extraAreaTimeLine->setDirection(d->extraAreaHighlightCollapseBlockNumber >= 0?
|
d->extraAreaTimeLine->setDirection(d->extraAreaHighlightCollapseBlockNumber >= 0?
|
||||||
@@ -2500,12 +2509,12 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
|
|||||||
|
|
||||||
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {
|
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {
|
||||||
if (e->button() == Qt::LeftButton) {
|
if (e->button() == Qt::LeftButton) {
|
||||||
if (TextBlockUserData::canCollapse(cursor.block())
|
if (d->m_codeFoldingVisible && TextBlockUserData::canCollapse(cursor.block())
|
||||||
&& !TextBlockUserData::hasClosingCollapseInside(cursor.block().next())
|
&& !TextBlockUserData::hasClosingCollapseInside(cursor.block().next())
|
||||||
&& collapseBox(cursor.block()).contains(e->pos())) {
|
&& collapseBox(cursor.block()).contains(e->pos())) {
|
||||||
setTextCursor(cursor);
|
setTextCursor(cursor);
|
||||||
toggleBlockVisible(cursor.block());
|
toggleBlockVisible(cursor.block());
|
||||||
} else if (e->pos().x() > markWidth) {
|
} else if (d->m_marksVisible && e->pos().x() > markWidth) {
|
||||||
QTextCursor selection = cursor;
|
QTextCursor selection = cursor;
|
||||||
selection.setVisualNavigation(true);
|
selection.setVisualNavigation(true);
|
||||||
d->extraAreaSelectionAnchorBlockNumber = selection.blockNumber();
|
d->extraAreaSelectionAnchorBlockNumber = selection.blockNumber();
|
||||||
@@ -2515,7 +2524,7 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
|
|||||||
} else {
|
} else {
|
||||||
d->extraAreaToggleMarkBlockNumber = cursor.blockNumber();
|
d->extraAreaToggleMarkBlockNumber = cursor.blockNumber();
|
||||||
}
|
}
|
||||||
} else if (e->button() == Qt::RightButton) {
|
} else if (d->m_marksVisible && e->button() == Qt::RightButton) {
|
||||||
QMenu * contextMenu = new QMenu(this);
|
QMenu * contextMenu = new QMenu(this);
|
||||||
emit d->m_editable->markContextMenuRequested(editableInterface(), cursor.blockNumber() + 1, contextMenu);
|
emit d->m_editable->markContextMenuRequested(editableInterface(), cursor.blockNumber() + 1, contextMenu);
|
||||||
if (!contextMenu->isEmpty())
|
if (!contextMenu->isEmpty())
|
||||||
@@ -3397,9 +3406,12 @@ void BaseTextEditor::collapse()
|
|||||||
TextEditDocumentLayout *documentLayout = qobject_cast<TextEditDocumentLayout*>(doc->documentLayout());
|
TextEditDocumentLayout *documentLayout = qobject_cast<TextEditDocumentLayout*>(doc->documentLayout());
|
||||||
QTC_ASSERT(documentLayout, return);
|
QTC_ASSERT(documentLayout, return);
|
||||||
QTextBlock block = textCursor().block();
|
QTextBlock block = textCursor().block();
|
||||||
|
QTextBlock curBlock = block;
|
||||||
while (block.isValid()) {
|
while (block.isValid()) {
|
||||||
if (TextBlockUserData::canCollapse(block) && block.next().isVisible()) {
|
if (TextBlockUserData::canCollapse(block) && block.next().isVisible()) {
|
||||||
if ((block.next().userState()) >> 8 <= (textCursor().block().userState() >> 8))
|
if (block == curBlock || block.next() == curBlock)
|
||||||
|
break;
|
||||||
|
if ((block.next().userState()) >> 8 <= (curBlock.previous().userState() >> 8))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
block = block.previous();
|
block = block.previous();
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ public:
|
|||||||
TextBlockUserData *data = static_cast<TextBlockUserData*>(block.userData());
|
TextBlockUserData *data = static_cast<TextBlockUserData*>(block.userData());
|
||||||
if (!data || data->collapseMode() != CollapseAfter) {
|
if (!data || data->collapseMode() != CollapseAfter) {
|
||||||
data = static_cast<TextBlockUserData*>(block.next().userData());
|
data = static_cast<TextBlockUserData*>(block.next().userData());
|
||||||
if (!data || data->collapseMode() != TextBlockUserData::CollapseThis)
|
if (!data || data->collapseMode() != TextBlockUserData::CollapseThis || data->m_ifdefedOut)
|
||||||
data = 0;
|
data = 0;
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
|
|||||||