forked from qt-creator/qt-creator
Rename "[Mm]ethod(s)" to "[Ff]unction(s)"
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -357,7 +357,7 @@
|
|||||||
\image addressbook-tutorial-part2-signals-and-slots.png
|
\image addressbook-tutorial-part2-signals-and-slots.png
|
||||||
|
|
||||||
Finally, set the window title to "Simple Address Book" using the
|
Finally, set the window title to "Simple Address Book" using the
|
||||||
\l{QWidget::}{setWindowTitle()} function. The tr() method allows us
|
\l{QWidget::}{setWindowTitle()} function. The tr() function allows us
|
||||||
to translate user interface strings.
|
to translate user interface strings.
|
||||||
|
|
||||||
\snippet examples/addressbook-sdk/part2/addressbook.cpp window title
|
\snippet examples/addressbook-sdk/part2/addressbook.cpp window title
|
||||||
@@ -827,7 +827,7 @@
|
|||||||
when you enter a contact name to look up. Once you click the
|
when you enter a contact name to look up. Once you click the
|
||||||
dialog's \c findButton, the dialog is hidden and the result code is set to
|
dialog's \c findButton, the dialog is hidden and the result code is set to
|
||||||
either QDialog::Accepted or QDialog::Rejected by the FindDialog's
|
either QDialog::Accepted or QDialog::Rejected by the FindDialog's
|
||||||
\c findClicked() method. This ensures that you only search for a contact
|
\c findClicked() function. This ensures that you only search for a contact
|
||||||
if you have typed something in the FindDialog's line edit.
|
if you have typed something in the FindDialog's line edit.
|
||||||
|
|
||||||
Then proceed to extract the search string, which in this case is
|
Then proceed to extract the search string, which in this case is
|
||||||
|
|||||||
@@ -86,10 +86,10 @@
|
|||||||
backward source code compatibility in patch releases, so:
|
backward source code compatibility in patch releases, so:
|
||||||
|
|
||||||
\list
|
\list
|
||||||
\li Do not add or remove any public API (e.g. global functions,x
|
\li Do not add or remove any public API (e.g. global functions,
|
||||||
public/protected/private methods).
|
public/protected/private member functions).
|
||||||
\li Do not reimplement methods (not even inlines,
|
\li Do not reimplement functions (not even inlines,
|
||||||
nor protected or private methods).
|
nor protected or private functions).
|
||||||
\li Check
|
\li Check
|
||||||
\l {http://wiki.qt-project.org/index.php/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds}
|
\l {http://wiki.qt-project.org/index.php/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds}
|
||||||
for ways to preserve binary compatibility.
|
for ways to preserve binary compatibility.
|
||||||
@@ -687,7 +687,7 @@
|
|||||||
will not remove the const modifier.
|
will not remove the const modifier.
|
||||||
\li Do not use \c dynamic_cast, use \c {qobject_cast} for QObjects, or
|
\li Do not use \c dynamic_cast, use \c {qobject_cast} for QObjects, or
|
||||||
refactor your design, for example by introducing a \c {type()}
|
refactor your design, for example by introducing a \c {type()}
|
||||||
method (see QListWidgetItem), unless you know what you do.
|
function (see QListWidgetItem), unless you know what you do.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Compiler and Platform-specific Issues
|
\section2 Compiler and Platform-specific Issues
|
||||||
@@ -854,7 +854,7 @@
|
|||||||
binary 0, instead of comparing it to 0.0, or, preferred, move
|
binary 0, instead of comparing it to 0.0, or, preferred, move
|
||||||
such code into an implementation file.
|
such code into an implementation file.
|
||||||
|
|
||||||
\li Do not hide virtual methods in subclasses (\{-Woverloaded-virtual}).
|
\li Do not hide virtual functions in subclasses (\{-Woverloaded-virtual}).
|
||||||
If the baseclass A has a virtual \c {int val()} and subclass B an
|
If the baseclass A has a virtual \c {int val()} and subclass B an
|
||||||
overload with the same name, \c {int val(int x)}, the A \c val function
|
overload with the same name, \c {int val(int x)}, the A \c val function
|
||||||
is hidden. Use the \c using keyword to make it visible again, and
|
is hidden. Use the \c using keyword to make it visible again, and
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ bool ExamplePlugin::initialize(const QStringList &arguments, QString *errorStrin
|
|||||||
// Load settings
|
// Load settings
|
||||||
// Add actions to menus
|
// Add actions to menus
|
||||||
// Connect to other plugins' signals
|
// Connect to other plugins' signals
|
||||||
// In the initialize method, a plugin can be sure that the plugins it
|
// In the initialize function, a plugin can be sure that the plugins it
|
||||||
// depends on have initialized their members.
|
// depends on have initialized their members.
|
||||||
|
|
||||||
Q_UNUSED(arguments)
|
Q_UNUSED(arguments)
|
||||||
@@ -62,7 +62,7 @@ bool ExamplePlugin::initialize(const QStringList &arguments, QString *errorStrin
|
|||||||
void ExamplePlugin::extensionsInitialized()
|
void ExamplePlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
// Retrieve objects from the plugin manager's object pool
|
// Retrieve objects from the plugin manager's object pool
|
||||||
// In the extensionsInitialized method, a plugin can be sure that all
|
// In the extensionsInitialized function, a plugin can be sure that all
|
||||||
// plugins that depend on it are completely initialized.
|
// plugins that depend on it are completely initialized.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ public:
|
|||||||
ExamplePlugin();
|
ExamplePlugin();
|
||||||
~ExamplePlugin();
|
~ExamplePlugin();
|
||||||
|
|
||||||
//! [plugin methods]
|
//! [plugin functions]
|
||||||
bool initialize(const QStringList &arguments, QString *errorString);
|
bool initialize(const QStringList &arguments, QString *errorString);
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
ShutdownFlag aboutToShutdown();
|
ShutdownFlag aboutToShutdown();
|
||||||
//! [plugin methods]
|
//! [plugin functions]
|
||||||
|
|
||||||
//! [slot]
|
//! [slot]
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -276,11 +276,11 @@
|
|||||||
All \QC plugins must be derived from \l{ExtensionSystem::IPlugin} and
|
All \QC plugins must be derived from \l{ExtensionSystem::IPlugin} and
|
||||||
are QObjects.
|
are QObjects.
|
||||||
|
|
||||||
\snippet exampleplugin/exampleplugin.h plugin methods
|
\snippet exampleplugin/exampleplugin.h plugin functions
|
||||||
|
|
||||||
The base class defines basic methods that are called during the life cycle
|
The base class defines basic functions that are called during the life cycle
|
||||||
of a plugin, which are here implemented for your new plugin.
|
of a plugin, which are here implemented for your new plugin.
|
||||||
These methods and their roles are described in detail in
|
These functions and their roles are described in detail in
|
||||||
\l{The Plugin Life Cycle}.
|
\l{The Plugin Life Cycle}.
|
||||||
|
|
||||||
\snippet exampleplugin/exampleplugin.h slot
|
\snippet exampleplugin/exampleplugin.h slot
|
||||||
@@ -296,8 +296,8 @@
|
|||||||
All the necessary header files from the plugin code itself,
|
All the necessary header files from the plugin code itself,
|
||||||
from the Core plugin, and from Qt are included in the beginning of the file.
|
from the Core plugin, and from Qt are included in the beginning of the file.
|
||||||
The setup of the menu and menu item
|
The setup of the menu and menu item
|
||||||
is done in the plugin's \c{initialize} method, which is the first thing called
|
is done in the plugin's \c{initialize} function, which is the first thing called
|
||||||
after the plugin constructor. In that method, the plugin can be sure that the basic
|
after the plugin constructor. In that function, the plugin can be sure that the basic
|
||||||
setup of plugin's that it depends on has been done, for example the Core plugin's
|
setup of plugin's that it depends on has been done, for example the Core plugin's
|
||||||
\c{ActionManager} instance has been created.
|
\c{ActionManager} instance has been created.
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
tracks the state of the plugin.
|
tracks the state of the plugin.
|
||||||
You can get the \l{ExtensionSystem::PluginSpec} instances via the
|
You can get the \l{ExtensionSystem::PluginSpec} instances via the
|
||||||
plugin manager's \l{ExtensionSystem::PluginManager::plugins()}{plugins()}
|
plugin manager's \l{ExtensionSystem::PluginManager::plugins()}{plugins()}
|
||||||
method, or, after a plugin is loaded, through the plugin's
|
function, or, after a plugin is loaded, through the plugin's
|
||||||
\l{ExtensionSystem::IPlugin::pluginSpec()}{pluginSpec()} method.
|
\l{ExtensionSystem::IPlugin::pluginSpec()}{pluginSpec()} function.
|
||||||
|
|
||||||
\li Sets the plugins to \c Read state.
|
\li Sets the plugins to \c Read state.
|
||||||
|
|
||||||
@@ -61,15 +61,15 @@
|
|||||||
|
|
||||||
\li Sets the plugins to \c Loaded state.
|
\li Sets the plugins to \c Loaded state.
|
||||||
|
|
||||||
\li Calls the \l{ExtensionSystem::IPlugin::initialize()}{initialize()} methods of
|
\li Calls the \l{ExtensionSystem::IPlugin::initialize()}{initialize()} functions of
|
||||||
all plugins in the order of the load queue. In the \c initialize method,
|
all plugins in the order of the load queue. In the \c initialize function,
|
||||||
a plugin should make sure that all exported interfaces are set up and available
|
a plugin should make sure that all exported interfaces are set up and available
|
||||||
to other plugins. A plugin can assume that plugins they depend on have set up
|
to other plugins. A plugin can assume that plugins they depend on have set up
|
||||||
their exported interfaces. For example, the \c Core plugin sets up the
|
their exported interfaces. For example, the \c Core plugin sets up the
|
||||||
\l{Core::ActionManager}, \l{Core::EditorManager} and all other publicly available
|
\l{Core::ActionManager}, \l{Core::EditorManager} and all other publicly available
|
||||||
interfaces, so other plugins can request and use them.
|
interfaces, so other plugins can request and use them.
|
||||||
|
|
||||||
The \l{ExtensionSystem::IPlugin::initialize()}{initialize()} method of a plugin
|
The \l{ExtensionSystem::IPlugin::initialize()}{initialize()} function of a plugin
|
||||||
is a good place for
|
is a good place for
|
||||||
\list
|
\list
|
||||||
\li registering objects in the plugin manager's object pool
|
\li registering objects in the plugin manager's object pool
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
\li Sets the plugins to \c Initialized state.
|
\li Sets the plugins to \c Initialized state.
|
||||||
|
|
||||||
\li Calls the \l{ExtensionSystem::IPlugin::extensionsInitialized()}{extensionsInitialized()}
|
\li Calls the \l{ExtensionSystem::IPlugin::extensionsInitialized()}{extensionsInitialized()}
|
||||||
methods of all plugins in \e reverse order of the load queue. After
|
functions of all plugins in \e reverse order of the load queue. After
|
||||||
the \c extensionsInitialized method, a plugin should be fully initialized, set up
|
the \c extensionsInitialized function, a plugin should be fully initialized, set up
|
||||||
and running. A plugin can assume that plugins that depend on it are fully set up,
|
and running. A plugin can assume that plugins that depend on it are fully set up,
|
||||||
and can finish the initialization of parts that can be extended by other plugins.
|
and can finish the initialization of parts that can be extended by other plugins.
|
||||||
For example, the \c Core plugin assumes that all plugins have registered
|
For example, the \c Core plugin assumes that all plugins have registered
|
||||||
@@ -97,10 +97,10 @@
|
|||||||
and afterwards \l{Core::ICore::coreOpened()}{coreOpened()}.
|
and afterwards \l{Core::ICore::coreOpened()}{coreOpened()}.
|
||||||
|
|
||||||
After startup, when the event loop of \QC is running, the plugin manager calls
|
After startup, when the event loop of \QC is running, the plugin manager calls
|
||||||
the \l{ExtensionSystem::IPlugin::delayedInitialize()}{delayedInitialize()} methods of all
|
the \l{ExtensionSystem::IPlugin::delayedInitialize()}{delayedInitialize()} functions of all
|
||||||
plugins in \e reverse order of the load queue. The calls are done on the main thread, but
|
plugins in \e reverse order of the load queue. The calls are done on the main thread, but
|
||||||
separated by a delay of a few milliseconds to ensure responsiveness of \QC.
|
separated by a delay of a few milliseconds to ensure responsiveness of \QC.
|
||||||
In the \c delayedInitialize method, a plugin can perform non-critical initialization
|
In the \c delayedInitialize function, a plugin can perform non-critical initialization
|
||||||
that could unnecessarily delay showing the \QC UI if done during startup.
|
that could unnecessarily delay showing the \QC UI if done during startup.
|
||||||
|
|
||||||
After all delayed initializations are done the \l{ExtensionSystem::PluginManager}{PluginManager}
|
After all delayed initializations are done the \l{ExtensionSystem::PluginManager}{PluginManager}
|
||||||
@@ -111,14 +111,14 @@
|
|||||||
plugin manager starts its shutdown sequence:
|
plugin manager starts its shutdown sequence:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Calls the \l{ExtensionSystem::IPlugin::aboutToShutdown()}{aboutToShutdown()} methods of
|
\li Calls the \l{ExtensionSystem::IPlugin::aboutToShutdown()}{aboutToShutdown()} functions of
|
||||||
all plugins in the order of the load queue. Plugins should perform measures
|
all plugins in the order of the load queue. Plugins should perform measures
|
||||||
for speeding up the actual shutdown here, like disconnecting signals that
|
for speeding up the actual shutdown here, like disconnecting signals that
|
||||||
would otherwise needlessly be called.
|
would otherwise needlessly be called.
|
||||||
If a plugin needs to delay the real shutdown for a while, for example if
|
If a plugin needs to delay the real shutdown for a while, for example if
|
||||||
it needs to wait for external processes to finish for a clean shutdown,
|
it needs to wait for external processes to finish for a clean shutdown,
|
||||||
the plugin can return \l{ExtensionSystem::IPlugin::AsynchronousShutdown} from this
|
the plugin can return \l{ExtensionSystem::IPlugin::AsynchronousShutdown} from this
|
||||||
method. This will make the plugin manager wait with the next step, and keep the main
|
function. This will make the plugin manager wait with the next step, and keep the main
|
||||||
event loop running, until all plugins requesting AsynchronousShutdown have sent
|
event loop running, until all plugins requesting AsynchronousShutdown have sent
|
||||||
the asynchronousShutdownFinished() signal.
|
the asynchronousShutdownFinished() signal.
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
\l{The Plugin Manager, the Object Pool, and Registered Objects}{global object pool}
|
\l{The Plugin Manager, the Object Pool, and Registered Objects}{global object pool}
|
||||||
via ExtensionSystem::PluginManager::getObjectByName() or
|
via ExtensionSystem::PluginManager::getObjectByName() or
|
||||||
ExtensionSystem::PluginManager::getObjectByClassName(), and use QMetaObject functions to call
|
ExtensionSystem::PluginManager::getObjectByClassName(), and use QMetaObject functions to call
|
||||||
methods on it.
|
functions on it.
|
||||||
|
|
||||||
\section2 Command Line Arguments
|
\section2 Command Line Arguments
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
line parsing and sanity checks based on that information.
|
line parsing and sanity checks based on that information.
|
||||||
If the plugin manager finds matching command line arguments for a plugin,
|
If the plugin manager finds matching command line arguments for a plugin,
|
||||||
it passes them on to the plugin's
|
it passes them on to the plugin's
|
||||||
\l{ExtensionSystem::IPlugin::initialize()}{initialize()} method.
|
\l{ExtensionSystem::IPlugin::initialize()}{initialize()} function.
|
||||||
|
|
||||||
All command line argument definitions are enclosed by a single \c argumentList
|
All command line argument definitions are enclosed by a single \c argumentList
|
||||||
tag. The individual command line arguments are defined by the \c argument tag,
|
tag. The individual command line arguments are defined by the \c argument tag,
|
||||||
|
|||||||
@@ -38,13 +38,13 @@
|
|||||||
and retrieved depending on different criteria.
|
and retrieved depending on different criteria.
|
||||||
|
|
||||||
Most interaction of plugins with the plugin manager should be done through the
|
Most interaction of plugins with the plugin manager should be done through the
|
||||||
ExtensionSystem::IPlugin interface, but the following tables summarize some methods
|
ExtensionSystem::IPlugin interface, but the following tables summarize some functions
|
||||||
and signals that can be useful for plugins.
|
and signals that can be useful for plugins.
|
||||||
See the ExtensionSystem::PluginManager reference documentation for the complete list.
|
See the ExtensionSystem::PluginManager reference documentation for the complete list.
|
||||||
|
|
||||||
\table
|
\table
|
||||||
\header
|
\header
|
||||||
\li Method
|
\li Function
|
||||||
\li Description
|
\li Description
|
||||||
\row
|
\row
|
||||||
\li instance()
|
\li instance()
|
||||||
@@ -97,9 +97,9 @@
|
|||||||
|
|
||||||
All objects of a specified type can be retrieved from the object pool
|
All objects of a specified type can be retrieved from the object pool
|
||||||
via the \l{ExtensionSystem::PluginManager::getObjects()}{getObjects()} and
|
via the \l{ExtensionSystem::PluginManager::getObjects()}{getObjects()} and
|
||||||
\l{ExtensionSystem::PluginManager::getObject()}{getObject()} methods.
|
\l{ExtensionSystem::PluginManager::getObject()}{getObject()} functions.
|
||||||
They are aware of Aggregation::Aggregate, so these methods use the Aggregation::query() methods
|
They are aware of Aggregation::Aggregate, so these functions use the Aggregation::query()
|
||||||
instead of qobject_cast to determine the matching objects.
|
functions instead of qobject_cast to determine the matching objects.
|
||||||
|
|
||||||
It is also possible to retrieve an object with a specific object name with
|
It is also possible to retrieve an object with a specific object name with
|
||||||
\l{ExtensionSystem::PluginManager::getObjectByName()}{getObjectByName()}
|
\l{ExtensionSystem::PluginManager::getObjectByName()}{getObjectByName()}
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
The complete code of \c webpagewizard.cpp looks as follows:
|
The complete code of \c webpagewizard.cpp looks as follows:
|
||||||
\snippet webpagewizard/webpagewizard.cpp 0
|
\snippet webpagewizard/webpagewizard.cpp 0
|
||||||
|
|
||||||
The registration of the wizard in the \c initialize() method
|
The registration of the wizard in the \c initialize() function
|
||||||
of a plugin looks like:
|
of a plugin looks like:
|
||||||
\snippet webpagewizard/webpagewizardplugin.cpp 0
|
\snippet webpagewizard/webpagewizardplugin.cpp 0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1011,7 +1011,7 @@
|
|||||||
easier to employ the Dumper Python class for that purpose. The Dumper
|
easier to employ the Dumper Python class for that purpose. The Dumper
|
||||||
Python class contains a complete framework to take care of the \c iname and
|
Python class contains a complete framework to take care of the \c iname and
|
||||||
\c addr fields, to handle children of simple types, references, pointers,
|
\c addr fields, to handle children of simple types, references, pointers,
|
||||||
enums, known and unknown structs as well as some convenience methods to
|
enums, known and unknown structs as well as some convenience functions to
|
||||||
handle common situations.
|
handle common situations.
|
||||||
|
|
||||||
The member functions of the \gui{Dumper} class are the following:
|
The member functions of the \gui{Dumper} class are the following:
|
||||||
@@ -1021,7 +1021,7 @@
|
|||||||
\li \gui{__init__(self)} - Initializes the output to an empty string and
|
\li \gui{__init__(self)} - Initializes the output to an empty string and
|
||||||
empties the child stack. This should not be used in user code.
|
empties the child stack. This should not be used in user code.
|
||||||
|
|
||||||
\li \gui{put(self, value)} - Low level method to directly append to the
|
\li \gui{put(self, value)} - Low level function to directly append to the
|
||||||
output string. That is also the fastest way to append output.
|
output string. That is also the fastest way to append output.
|
||||||
|
|
||||||
\li \gui{putField(self, name, value)} - Appends a name='value' field.
|
\li \gui{putField(self, name, value)} - Appends a name='value' field.
|
||||||
|
|||||||
@@ -151,13 +151,13 @@
|
|||||||
|
|
||||||
You can also select the symbol and press \key F2, or right-click the symbol
|
You can also select the symbol and press \key F2, or right-click the symbol
|
||||||
and select \gui {Follow Symbol Under Cursor} to move to its definition or
|
and select \gui {Follow Symbol Under Cursor} to move to its definition or
|
||||||
declaration. This feature is supported for namespaces, classes, methods,
|
declaration. This feature is supported for namespaces, classes, functions,
|
||||||
variables, include statements, and macros.
|
variables, include statements, and macros.
|
||||||
|
|
||||||
To switch between the definition and declaration of a method, place the
|
To switch between the definition and declaration of a function, place the
|
||||||
cursor on either and press \key {Shift+F2} or right-click and select \gui
|
cursor on either and press \key {Shift+F2} or right-click and select \gui
|
||||||
{Switch Between Method Declaration/Definition}. For example, this allows
|
{Switch Between Function Declaration/Definition}. For example, this allows
|
||||||
you to navigate from anywhere within a method body directly to the method
|
you to navigate from anywhere within a function body directly to the function
|
||||||
declaration.
|
declaration.
|
||||||
|
|
||||||
Links are opened in the same split by default. To open links in the next
|
Links are opened in the same split by default. To open links in the next
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
Use the incremental and advanced search to search from currently
|
Use the incremental and advanced search to search from currently
|
||||||
open projects or files on the file system or use the locator to
|
open projects or files on the file system or use the locator to
|
||||||
browse through projects, files, classes, methods, documentation and
|
browse through projects, files, classes, functions, documentation and
|
||||||
file systems.
|
file systems.
|
||||||
|
|
||||||
\li \l{Refactoring}
|
\li \l{Refactoring}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
\li Class fields
|
\li Class fields
|
||||||
|
|
||||||
\li Virtual methods
|
\li Virtual functions
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -1062,9 +1062,9 @@
|
|||||||
|
|
||||||
\li Interpret the \key Tab and \key Backspace key presses.
|
\li Interpret the \key Tab and \key Backspace key presses.
|
||||||
|
|
||||||
\li Indent the contents of classes, methods, blocks, and namespaces.
|
\li Indent the contents of classes, functions, blocks, and namespaces.
|
||||||
|
|
||||||
\li Indent braces in classes, namespaces, enums, methods, and blocks.
|
\li Indent braces in classes, namespaces, enums, functions, and blocks.
|
||||||
|
|
||||||
\li Control switch statements and their contents.
|
\li Control switch statements and their contents.
|
||||||
|
|
||||||
@@ -1178,14 +1178,14 @@
|
|||||||
You can indent public, protected, and private statements and declarations
|
You can indent public, protected, and private statements and declarations
|
||||||
related to them within classes.
|
related to them within classes.
|
||||||
|
|
||||||
You can also indent statements within methods and blocks and declarations
|
You can also indent statements within functions and blocks and declarations
|
||||||
within namespaces.
|
within namespaces.
|
||||||
|
|
||||||
\image qtcreator-code-style-content.png "Content options"
|
\image qtcreator-code-style-content.png "Content options"
|
||||||
|
|
||||||
\section1 Specifying Settings for Braces
|
\section1 Specifying Settings for Braces
|
||||||
|
|
||||||
You can indent class, namespace, enum and method declarations and code
|
You can indent class, namespace, enum and function declarations and code
|
||||||
blocks.
|
blocks.
|
||||||
|
|
||||||
\image qtcreator-code-style-braces.png "Braces options"
|
\image qtcreator-code-style-braces.png "Braces options"
|
||||||
@@ -1422,7 +1422,7 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\note You can also select \gui{Edit > Find/Replace > Advanced Find >
|
\note You can also select \gui{Edit > Find/Replace > Advanced Find >
|
||||||
C++ Symbols} to search for classes, methods, enums, and declarations
|
C++ Symbols} to search for classes, functions, enums, and declarations
|
||||||
either from files listed as part of the project or from all files that
|
either from files listed as part of the project or from all files that
|
||||||
are used by the code, such as include files.
|
are used by the code, such as include files.
|
||||||
|
|
||||||
@@ -1523,7 +1523,7 @@
|
|||||||
|
|
||||||
\li Create variable declarations
|
\li Create variable declarations
|
||||||
|
|
||||||
\li Create method declarations and definitions
|
\li Create function declarations and definitions
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
@@ -1817,21 +1817,21 @@
|
|||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\li Method name
|
\li Function name
|
||||||
\row
|
\row
|
||||||
\li Add 'Function' Declaration
|
\li Add 'Function' Declaration
|
||||||
\li Inserts the member function declaration that matches the member function
|
\li Inserts the member function declaration that matches the member function
|
||||||
definition into the class declaration. The function can be public,
|
definition into the class declaration. The function can be public,
|
||||||
protected, private, public slot, protected slot, or private slot.
|
protected, private, public slot, protected slot, or private slot.
|
||||||
\li Method name
|
\li Function name
|
||||||
\row
|
\row
|
||||||
\li Switch with Next/Previous Parameter
|
\li Switch with Next/Previous Parameter
|
||||||
\li Moves a parameter down or up one position in a parameter list.
|
\li Moves a parameter down or up one position in a parameter list.
|
||||||
\li Parameter in the declaration or definition of a function or method
|
\li Parameter in the declaration or definition of a function
|
||||||
\row
|
\row
|
||||||
\li Extract Method
|
\li Extract Function
|
||||||
\li Moves the selected code to a new method and replaces the block of
|
\li Moves the selected code to a new function and replaces the block of
|
||||||
code with a call to the new method. Enter a name for the method in
|
code with a call to the new function. Enter a name for the function in
|
||||||
the \gui {Extract Function Refactoring} dialog.
|
the \gui {Extract Function Refactoring} dialog.
|
||||||
\li Block of code selected
|
\li Block of code selected
|
||||||
\row
|
\row
|
||||||
@@ -1875,8 +1875,8 @@
|
|||||||
\li Generate Missing Q_PROPERTY Members
|
\li Generate Missing Q_PROPERTY Members
|
||||||
\li Adds missing members to a Q_PROPERTY:
|
\li Adds missing members to a Q_PROPERTY:
|
||||||
\list
|
\list
|
||||||
\li \c read method
|
\li \c read function
|
||||||
\li \c write method, if there is a WRITE
|
\li \c write function, if there is a WRITE
|
||||||
\li \c {onChanged} signal, if there is a NOTIFY
|
\li \c {onChanged} signal, if there is a NOTIFY
|
||||||
\li data member with the name \c {m_<propertyName>}
|
\li data member with the name \c {m_<propertyName>}
|
||||||
\endlist
|
\endlist
|
||||||
@@ -2187,7 +2187,7 @@
|
|||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
Filters locating files also accept paths, such as \c {tools/*main.cpp}.
|
Filters locating files also accept paths, such as \c {tools/*main.cpp}.
|
||||||
Filters locating class and method definitions also accept namespaces,
|
Filters locating class and function definitions also accept namespaces,
|
||||||
such as \c {Utils::*View}.
|
such as \c {Utils::*View}.
|
||||||
|
|
||||||
By default, the following filters are enabled and you do not need to use
|
By default, the following filters are enabled and you do not need to use
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
\li \l{Searching with the Locator}
|
\li \l{Searching with the Locator}
|
||||||
|
|
||||||
The locator provides one of the easiest ways in \QC to browse
|
The locator provides one of the easiest ways in \QC to browse
|
||||||
through projects, files, classes, methods, documentation and
|
through projects, files, classes, functions, documentation and
|
||||||
file systems.
|
file systems.
|
||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|||||||
@@ -391,14 +391,14 @@
|
|||||||
\row
|
\row
|
||||||
\li Follow symbol under cursor
|
\li Follow symbol under cursor
|
||||||
|
|
||||||
Works with namespaces, classes, methods, variables, include
|
Works with namespaces, classes, functions, variables, include
|
||||||
statements and macros
|
statements and macros
|
||||||
\li F2
|
\li F2
|
||||||
\row
|
\row
|
||||||
\li Rename symbol under cursor
|
\li Rename symbol under cursor
|
||||||
\li Ctrl+Shift+R
|
\li Ctrl+Shift+R
|
||||||
\row
|
\row
|
||||||
\li Switch between method declaration and definition
|
\li Switch between function declaration and definition
|
||||||
\li Shift+F2
|
\li Shift+F2
|
||||||
\row
|
\row
|
||||||
\li Open type hierarchy
|
\li Open type hierarchy
|
||||||
|
|||||||
@@ -212,7 +212,7 @@
|
|||||||
\section1 Locating Files
|
\section1 Locating Files
|
||||||
|
|
||||||
The \gui Locator provides one of the easiest ways in \QC to browse
|
The \gui Locator provides one of the easiest ways in \QC to browse
|
||||||
through projects, files, classes, methods, documentation and file systems.
|
through projects, files, classes, functions, documentation and file systems.
|
||||||
To quickly access files not directly mentioned in your project, you can
|
To quickly access files not directly mentioned in your project, you can
|
||||||
create your own locator filters. That way you can locate files in a
|
create your own locator filters. That way you can locate files in a
|
||||||
directory structure you have defined.
|
directory structure you have defined.
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
output panes (7).
|
output panes (7).
|
||||||
|
|
||||||
You can use the locator (6) to to browse through projects, files, classes,
|
You can use the locator (6) to to browse through projects, files, classes,
|
||||||
methods, documentation, and file systems.
|
functions, documentation, and file systems.
|
||||||
|
|
||||||
\section1 Modes
|
\section1 Modes
|
||||||
|
|
||||||
|
|||||||
@@ -281,17 +281,17 @@
|
|||||||
|
|
||||||
The locator can be used to open files, but opening files is also just a
|
The locator can be used to open files, but opening files is also just a
|
||||||
step on the way to accomplish a task. For example, consider the following
|
step on the way to accomplish a task. For example, consider the following
|
||||||
use case: \e {Fix AMethod in SomeClass which comes from
|
use case: \e {Fix AFunction in SomeClass which comes from
|
||||||
someclass.cpp/someclass.h}.
|
someclass.cpp/someclass.h}.
|
||||||
|
|
||||||
With a tabbed user interface, developers would search for someclass.cpp in
|
With a tabbed user interface, developers would search for someclass.cpp in
|
||||||
the tab bar, and then search for \c {::AMethod}, only to find out that the
|
the tab bar, and then search for \c {::AFunction}, only to find out that the
|
||||||
method is not located in that file. They would then search for someclass.h
|
function is not located in that file. They would then search for someclass.h
|
||||||
in the tab bar, find our that the function is inline, fix the problem, and
|
in the tab bar, find our that the function is inline, fix the problem, and
|
||||||
forget where they came from.
|
forget where they came from.
|
||||||
|
|
||||||
With \QC, developers can type \c {Ctrl+K m AMet} to find the method.
|
With \QC, developers can type \c {Ctrl+K m AFun} to find the function.
|
||||||
Typically, they only need to type 3 to 4 characters of the method name.
|
Typically, they only need to type 3 to 4 characters of the function name.
|
||||||
They can then fix the problem and press \key Alt+Back to go back to where
|
They can then fix the problem and press \key Alt+Back to go back to where
|
||||||
they were.
|
they were.
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QScriptEngine;
|
class QScriptEngine;
|
||||||
class QDeclarativeEngine;
|
class QDeclarativeEngine;
|
||||||
|
|
||||||
// Helper methods to access private API through a stable interface
|
// Helper functions to access private API through a stable interface
|
||||||
// This is used in the qmljsdebugger library of QtCreator.
|
// This is used in the qmljsdebugger library of QtCreator.
|
||||||
class QMLJSDEBUGGER_EXTERN QDeclarativeDebugHelper
|
class QMLJSDEBUGGER_EXTERN QDeclarativeDebugHelper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error
|
|||||||
// Load settings
|
// Load settings
|
||||||
// Add actions to menus
|
// Add actions to menus
|
||||||
// Connect to other plugins' signals
|
// Connect to other plugins' signals
|
||||||
// In the initialize method, a plugin can be sure that the plugins it
|
// In the initialize function, a plugin can be sure that the plugins it
|
||||||
// depends on have initialized their members.
|
// depends on have initialized their members.
|
||||||
|
|
||||||
Q_UNUSED(arguments)
|
Q_UNUSED(arguments)
|
||||||
@@ -57,7 +57,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error
|
|||||||
void %PluginName%Plugin::extensionsInitialized()
|
void %PluginName%Plugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
// Retrieve objects from the plugin manager's object pool
|
// Retrieve objects from the plugin manager's object pool
|
||||||
// In the extensionsInitialized method, a plugin can be sure that all
|
// In the extensionsInitialized function, a plugin can be sure that all
|
||||||
// plugins that depend on it are completely initialized.
|
// plugins that depend on it are completely initialized.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
-2
@@ -29,10 +29,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
All firstToken/lastToken methods below which have a doxygen comment with
|
All firstToken/lastToken functions below which have a doxygen comment with
|
||||||
\generated in it, will be re-generated when the tool "cplusplus-update-frontend" is run.
|
\generated in it, will be re-generated when the tool "cplusplus-update-frontend" is run.
|
||||||
|
|
||||||
For methods which are hand-coded, or which should not be changed, make sure that
|
For functions which are hand-coded, or which should not be changed, make sure that
|
||||||
the comment is gone.
|
the comment is gone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
other components in the Aggregate to the outside.
|
other components in the Aggregate to the outside.
|
||||||
Specifically that means:
|
Specifically that means:
|
||||||
\list
|
\list
|
||||||
\li They can be "cast" to each other (using query and query_all methods).
|
\li They can be "cast" to each other (using query and query_all functions).
|
||||||
\li Their life cycle is coupled, i.e. whenever one is deleted all of them are.
|
\li Their life cycle is coupled, i.e. whenever one is deleted all of them are.
|
||||||
\endlist
|
\endlist
|
||||||
Components can be of any QObject derived type.
|
Components can be of any QObject derived type.
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
[...]
|
[...]
|
||||||
MyInterface *object = new MyInterface; // this is single inheritance
|
MyInterface *object = new MyInterface; // this is single inheritance
|
||||||
\endcode
|
\endcode
|
||||||
The query method works like a qobject_cast with normal objects:
|
The query function works like a qobject_cast with normal objects:
|
||||||
\code
|
\code
|
||||||
Q_ASSERT(query<MyInterface>(object) == object);
|
Q_ASSERT(query<MyInterface>(object) == object);
|
||||||
Q_ASSERT(query<MyInterfaceEx>(object) == 0);
|
Q_ASSERT(query<MyInterfaceEx>(object) == 0);
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\fn T *Aggregate::component()
|
\fn T *Aggregate::component()
|
||||||
|
|
||||||
Template method that returns the component with the given type, if there is one.
|
Template function that returns the component with the given type, if there is one.
|
||||||
If there are multiple components with that type a random one is returned.
|
If there are multiple components with that type a random one is returned.
|
||||||
|
|
||||||
\sa Aggregate::components()
|
\sa Aggregate::components()
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\fn QList<T *> Aggregate::components()
|
\fn QList<T *> Aggregate::components()
|
||||||
|
|
||||||
Template method that returns all components with the given type, if there are any.
|
Template function that returns all components with the given type, if there are any.
|
||||||
|
|
||||||
\sa Aggregate::component()
|
\sa Aggregate::component()
|
||||||
\sa Aggregate::add()
|
\sa Aggregate::add()
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ void Document::setGlobalNamespace(Namespace *globalNamespace)
|
|||||||
* Extract the function name including scope at the given position.
|
* Extract the function name including scope at the given position.
|
||||||
*
|
*
|
||||||
* Note that a function (scope) starts at the name of that function, not at the return type. The
|
* Note that a function (scope) starts at the name of that function, not at the return type. The
|
||||||
* implication is that this method will return an empty string when the line/column is on the
|
* implication is that this function will return an empty string when the line/column is on the
|
||||||
* return type.
|
* return type.
|
||||||
*
|
*
|
||||||
* \param line the line number, starting with line 1
|
* \param line the line number, starting with line 1
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ QString Preprocessor::State::guardStateToString(int guardState)
|
|||||||
* occurs inside the #ifndef block, but not nested inside other
|
* occurs inside the #ifndef block, but not nested inside other
|
||||||
* #if/#ifdef/#ifndef blocks.
|
* #if/#ifdef/#ifndef blocks.
|
||||||
*
|
*
|
||||||
* This method tracks the state, and is called from \c updateIncludeGuardState
|
* This function tracks the state, and is called from \c updateIncludeGuardState
|
||||||
* which handles the most common no-op cases.
|
* which handles the most common no-op cases.
|
||||||
*
|
*
|
||||||
* @param hint indicates what kind of token is encountered in the input
|
* @param hint indicates what kind of token is encountered in the input
|
||||||
@@ -857,7 +857,7 @@ _Lagain:
|
|||||||
// to the macro that generated this token. In either case, the macro
|
// to the macro that generated this token. In either case, the macro
|
||||||
// that generated the token still needs to be blocked (!), which is
|
// that generated the token still needs to be blocked (!), which is
|
||||||
// recorded in the token buffer. Removing the blocked macro and the
|
// recorded in the token buffer. Removing the blocked macro and the
|
||||||
// empty token buffer happens the next time that this method is called.
|
// empty token buffer happens the next time that this function is called.
|
||||||
} else {
|
} else {
|
||||||
// No token buffer, so have the lexer scan the next token.
|
// No token buffer, so have the lexer scan the next token.
|
||||||
tk->setSource(m_state.m_source);
|
tk->setSource(m_state.m_source);
|
||||||
|
|||||||
@@ -64,10 +64,10 @@
|
|||||||
\list 1
|
\list 1
|
||||||
\li All plugin libraries are loaded in \e{root-to-leaf} order of the
|
\li All plugin libraries are loaded in \e{root-to-leaf} order of the
|
||||||
dependency tree.
|
dependency tree.
|
||||||
\li All plugins' initialize methods are called in \e{root-to-leaf} order
|
\li All plugins' initialize functions are called in \e{root-to-leaf} order
|
||||||
of the dependency tree. This is a good place to put
|
of the dependency tree. This is a good place to put
|
||||||
objects in the plugin manager's object pool.
|
objects in the plugin manager's object pool.
|
||||||
\li All plugins' extensionsInitialized methods are called in \e{leaf-to-root}
|
\li All plugins' extensionsInitialized functions are called in \e{leaf-to-root}
|
||||||
order of the dependency tree. At this point, plugins can
|
order of the dependency tree. At this point, plugins can
|
||||||
be sure that all plugins that depend on this plugin have
|
be sure that all plugins that depend on this plugin have
|
||||||
been initialized completely (implying that they have put
|
been initialized completely (implying that they have put
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
Plugins have access to the plugin manager
|
Plugins have access to the plugin manager
|
||||||
(and its object pool) via the PluginManager::instance()
|
(and its object pool) via the PluginManager::instance()
|
||||||
method.
|
function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -87,10 +87,10 @@
|
|||||||
\brief Called after the plugin has been loaded and the IPlugin instance
|
\brief Called after the plugin has been loaded and the IPlugin instance
|
||||||
has been created.
|
has been created.
|
||||||
|
|
||||||
The initialize methods of plugins that depend
|
The initialize functions of plugins that depend
|
||||||
on this plugin are called after the initialize method of this plugin
|
on this plugin are called after the initialize function of this plugin
|
||||||
has been called. Plugins should initialize their internal state in this
|
has been called. Plugins should initialize their internal state in this
|
||||||
method. Returns if initialization of successful. If it wasn't successful,
|
function. Returns if initialization of successful. If it wasn't successful,
|
||||||
the \a errorString should be set to a user-readable message
|
the \a errorString should be set to a user-readable message
|
||||||
describing the reason.
|
describing the reason.
|
||||||
|
|
||||||
@@ -100,11 +100,11 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void IPlugin::extensionsInitialized()
|
\fn void IPlugin::extensionsInitialized()
|
||||||
\brief Called after the IPlugin::initialize() method has been called,
|
\brief Called after the IPlugin::initialize() function has been called,
|
||||||
and after both the IPlugin::initialize() and IPlugin::extensionsInitialized()
|
and after both the IPlugin::initialize() and IPlugin::extensionsInitialized()
|
||||||
methods of plugins that depend on this plugin have been called.
|
functions of plugins that depend on this plugin have been called.
|
||||||
|
|
||||||
In this method, the plugin can assume that plugins that depend on
|
In this function, the plugin can assume that plugins that depend on
|
||||||
this plugin are fully 'up and running'. It is a good place to
|
this plugin are fully 'up and running'. It is a good place to
|
||||||
look in the plugin manager's object pool for objects that have
|
look in the plugin manager's object pool for objects that have
|
||||||
been provided by dependent plugins.
|
been provided by dependent plugins.
|
||||||
@@ -115,17 +115,17 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn bool IPlugin::delayedInitialize()
|
\fn bool IPlugin::delayedInitialize()
|
||||||
\brief Called after all plugins' IPlugin::extensionsInitialized() method has been called,
|
\brief Called after all plugins' IPlugin::extensionsInitialized() function has been called,
|
||||||
and after the IPlugin::delayedInitialize() method of plugins that depend on this plugin
|
and after the IPlugin::delayedInitialize() function of plugins that depend on this plugin
|
||||||
have been called.
|
have been called.
|
||||||
|
|
||||||
The plugins' delayedInitialize() methods are called after the application is already running,
|
The plugins' delayedInitialize() functions are called after the application is already running,
|
||||||
with a few milliseconds delay to application startup, and between individual delayedInitialize
|
with a few milliseconds delay to application startup, and between individual delayedInitialize
|
||||||
method calls. To avoid unnecessary delays, a plugin should return true from the method if it
|
function calls. To avoid unnecessary delays, a plugin should return true from the function if it
|
||||||
actually implements it, to indicate that the next plugins' delayedInitialize() call should
|
actually implements it, to indicate that the next plugins' delayedInitialize() call should
|
||||||
be delayed a few milliseconds to give input and paint events a chance to be processed.
|
be delayed a few milliseconds to give input and paint events a chance to be processed.
|
||||||
|
|
||||||
This method can be used if a plugin needs to do non-trivial setup that doesn't
|
This function can be used if a plugin needs to do non-trivial setup that doesn't
|
||||||
necessarily needs to be done directly at startup, but still should be done within a
|
necessarily needs to be done directly at startup, but still should be done within a
|
||||||
short time afterwards. This can increase the felt plugin/application startup
|
short time afterwards. This can increase the felt plugin/application startup
|
||||||
time a lot, with very little effort.
|
time a lot, with very little effort.
|
||||||
@@ -139,16 +139,16 @@
|
|||||||
\brief Called during a shutdown sequence in the same order as initialization
|
\brief Called during a shutdown sequence in the same order as initialization
|
||||||
before the plugins get deleted in reverse order.
|
before the plugins get deleted in reverse order.
|
||||||
|
|
||||||
This method should be used to disconnect from other plugins,
|
This function should be used to disconnect from other plugins,
|
||||||
hide all UI, and optimize shutdown in general.
|
hide all UI, and optimize shutdown in general.
|
||||||
If a plugin needs to delay the real shutdown for a while, for example if
|
If a plugin needs to delay the real shutdown for a while, for example if
|
||||||
it needs to wait for external processes to finish for a clean shutdown,
|
it needs to wait for external processes to finish for a clean shutdown,
|
||||||
the plugin can return IPlugin::AsynchronousShutdown from this method. This
|
the plugin can return IPlugin::AsynchronousShutdown from this function. This
|
||||||
will keep the main event loop running after the aboutToShutdown() sequence
|
will keep the main event loop running after the aboutToShutdown() sequence
|
||||||
has finished, until all plugins requesting AsynchronousShutdown have sent
|
has finished, until all plugins requesting AsynchronousShutdown have sent
|
||||||
the asynchronousShutdownFinished() signal.
|
the asynchronousShutdownFinished() signal.
|
||||||
|
|
||||||
The default implementation of this method does nothing and returns
|
The default implementation of this function does nothing and returns
|
||||||
IPlugin::SynchronousShutdown.
|
IPlugin::SynchronousShutdown.
|
||||||
|
|
||||||
Returns IPlugin::AsynchronousShutdown if the plugin needs to perform
|
Returns IPlugin::AsynchronousShutdown if the plugin needs to perform
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
/*!
|
/*!
|
||||||
\fn QObject *IPlugin::remoteCommand(const QStringList &options, const QStringList &arguments)
|
\fn QObject *IPlugin::remoteCommand(const QStringList &options, const QStringList &arguments)
|
||||||
\brief When \QC is executed with the -client argument while already another instance of \QC
|
\brief When \QC is executed with the -client argument while already another instance of \QC
|
||||||
is running, this method of plugins is called in the running instance.
|
is running, this function of plugins is called in the running instance.
|
||||||
|
|
||||||
Plugin-specific arguments are passed in \a options, while the rest of the
|
Plugin-specific arguments are passed in \a options, while the rest of the
|
||||||
arguments are passed in \a arguments.
|
arguments are passed in \a arguments.
|
||||||
@@ -215,7 +215,7 @@ PluginSpec *IPlugin::pluginSpec() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void IPlugin::addObject(QObject *obj)
|
\fn void IPlugin::addObject(QObject *obj)
|
||||||
Convenience method that registers \a obj in the plugin manager's
|
Convenience function that registers \a obj in the plugin manager's
|
||||||
plugin pool by just calling PluginManager::addObject().
|
plugin pool by just calling PluginManager::addObject().
|
||||||
*/
|
*/
|
||||||
void IPlugin::addObject(QObject *obj)
|
void IPlugin::addObject(QObject *obj)
|
||||||
@@ -225,7 +225,7 @@ void IPlugin::addObject(QObject *obj)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void IPlugin::addAutoReleasedObject(QObject *obj)
|
\fn void IPlugin::addAutoReleasedObject(QObject *obj)
|
||||||
Convenience method for registering \a obj in the plugin manager's
|
Convenience function for registering \a obj in the plugin manager's
|
||||||
plugin pool. Usually, registered objects must be removed from
|
plugin pool. Usually, registered objects must be removed from
|
||||||
the object pool and deleted by hand.
|
the object pool and deleted by hand.
|
||||||
Objects added to the pool via addAutoReleasedObject are automatically
|
Objects added to the pool via addAutoReleasedObject are automatically
|
||||||
@@ -241,7 +241,7 @@ void IPlugin::addAutoReleasedObject(QObject *obj)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void IPlugin::removeObject(QObject *obj)
|
\fn void IPlugin::removeObject(QObject *obj)
|
||||||
Convenience method that unregisters \a obj from the plugin manager's
|
Convenience function that unregisters \a obj from the plugin manager's
|
||||||
plugin pool by just calling PluginManager::removeObject().
|
plugin pool by just calling PluginManager::removeObject().
|
||||||
*/
|
*/
|
||||||
void IPlugin::removeObject(QObject *obj)
|
void IPlugin::removeObject(QObject *obj)
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void PluginErrorView::update(PluginSpec *spec)
|
|||||||
break;
|
break;
|
||||||
case PluginSpec::Initialized:
|
case PluginSpec::Initialized:
|
||||||
text = tr("Initialized");
|
text = tr("Initialized");
|
||||||
tooltip = tr("Plugin's initialization method succeeded");
|
tooltip = tr("Plugin's initialization function succeeded");
|
||||||
break;
|
break;
|
||||||
case PluginSpec::Running:
|
case PluginSpec::Running:
|
||||||
text = tr("Running");
|
text = tr("Running");
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ enum { debugLeaks = 0 };
|
|||||||
Plugins (and everybody else) can add objects to a common 'pool' that is located in
|
Plugins (and everybody else) can add objects to a common 'pool' that is located in
|
||||||
the plugin manager. Objects in the pool must derive from QObject, there are no other
|
the plugin manager. Objects in the pool must derive from QObject, there are no other
|
||||||
prerequisites. All objects of a specified type can be retrieved from the object pool
|
prerequisites. All objects of a specified type can be retrieved from the object pool
|
||||||
via the getObjects() and getObject() methods. They are aware of Aggregation::Aggregate, i.e.
|
via the getObjects() and getObject() functions. They are aware of Aggregation::Aggregate, i.e.
|
||||||
these methods use the Aggregation::query methods instead of a qobject_cast to determine
|
these functions use the Aggregation::query functions instead of a qobject_cast to determine
|
||||||
the matching objects.
|
the matching objects.
|
||||||
|
|
||||||
Whenever the state of the object pool changes a corresponding signal is emitted by the plugin manager.
|
Whenever the state of the object pool changes a corresponding signal is emitted by the plugin manager.
|
||||||
@@ -134,7 +134,7 @@ enum { debugLeaks = 0 };
|
|||||||
object in the pool. This approach does neither require the "user" plugin being
|
object in the pool. This approach does neither require the "user" plugin being
|
||||||
linked against the "provider" plugin nor a common shared
|
linked against the "provider" plugin nor a common shared
|
||||||
header file. The exposed interface is implicitly given by the
|
header file. The exposed interface is implicitly given by the
|
||||||
invokable methods of the "provider" object in the object pool.
|
invokable functions of the "provider" object in the object pool.
|
||||||
|
|
||||||
The \c{ExtensionSystem::invoke} function template encapsulates
|
The \c{ExtensionSystem::invoke} function template encapsulates
|
||||||
{ExtensionSystem::Invoker} construction for the common case where
|
{ExtensionSystem::Invoker} construction for the common case where
|
||||||
@@ -220,11 +220,11 @@ enum { debugLeaks = 0 };
|
|||||||
|
|
||||||
Retrieves the object of a given type from the object pool.
|
Retrieves the object of a given type from the object pool.
|
||||||
|
|
||||||
This method is aware of Aggregation::Aggregate. That is, it uses
|
This function is aware of Aggregation::Aggregate. That is, it uses
|
||||||
the \c Aggregation::query methods instead of \c qobject_cast to
|
the \c Aggregation::query functions instead of \c qobject_cast to
|
||||||
determine the type of an object.
|
determine the type of an object.
|
||||||
If there are more than one object of the given type in
|
If there are more than one object of the given type in
|
||||||
the object pool, this method will choose an arbitrary one of them.
|
the object pool, this function will choose an arbitrary one of them.
|
||||||
|
|
||||||
\sa addObject()
|
\sa addObject()
|
||||||
*/
|
*/
|
||||||
@@ -234,8 +234,8 @@ enum { debugLeaks = 0 };
|
|||||||
|
|
||||||
Retrieves all objects of a given type from the object pool.
|
Retrieves all objects of a given type from the object pool.
|
||||||
|
|
||||||
This method is aware of Aggregation::Aggregate. That is, it uses
|
This function is aware of Aggregation::Aggregate. That is, it uses
|
||||||
the \c Aggregation::query methods instead of \c qobject_cast to
|
the \c Aggregation::query functions instead of \c qobject_cast to
|
||||||
determine the type of an object.
|
determine the type of an object.
|
||||||
|
|
||||||
\sa addObject()
|
\sa addObject()
|
||||||
@@ -570,7 +570,7 @@ void PluginManager::remoteArguments(const QString &serializedArgument, QObject *
|
|||||||
Application options always override any plugin's options.
|
Application options always override any plugin's options.
|
||||||
|
|
||||||
\a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found.
|
\a foundAppOptions is set to pairs of ("option string", "argument") for any application options that were found.
|
||||||
The command line options that were not processed can be retrieved via the arguments() method.
|
The command line options that were not processed can be retrieved via the arguments() function.
|
||||||
If an error occurred (like missing argument for an option that requires one), \a errorString contains
|
If an error occurred (like missing argument for an option that requires one), \a errorString contains
|
||||||
a descriptive message of the error.
|
a descriptive message of the error.
|
||||||
|
|
||||||
@@ -675,7 +675,7 @@ void PluginManager::startTests()
|
|||||||
if (!pluginSpec->plugin())
|
if (!pluginSpec->plugin())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Collect all test functions/methods of the plugin.
|
// Collect all test functions of the plugin.
|
||||||
QStringList allTestFunctions;
|
QStringList allTestFunctions;
|
||||||
const QMetaObject *metaObject = pluginSpec->plugin()->metaObject();
|
const QMetaObject *metaObject = pluginSpec->plugin()->metaObject();
|
||||||
|
|
||||||
|
|||||||
@@ -128,19 +128,19 @@
|
|||||||
information is available via the PluginSpec.
|
information is available via the PluginSpec.
|
||||||
\value Resolved
|
\value Resolved
|
||||||
The dependencies given in the description file have been
|
The dependencies given in the description file have been
|
||||||
successfully found, and are available via the dependencySpecs() method.
|
successfully found, and are available via the dependencySpecs() function.
|
||||||
\value Loaded
|
\value Loaded
|
||||||
The plugin's library is loaded and the plugin instance created
|
The plugin's library is loaded and the plugin instance created
|
||||||
(available through plugin()).
|
(available through plugin()).
|
||||||
\value Initialized
|
\value Initialized
|
||||||
The plugin instance's IPlugin::initialize() method has been called
|
The plugin instance's IPlugin::initialize() function has been called
|
||||||
and returned a success value.
|
and returned a success value.
|
||||||
\value Running
|
\value Running
|
||||||
The plugin's dependencies are successfully initialized and
|
The plugin's dependencies are successfully initialized and
|
||||||
extensionsInitialized has been called. The loading process is
|
extensionsInitialized has been called. The loading process is
|
||||||
complete.
|
complete.
|
||||||
\value Stopped
|
\value Stopped
|
||||||
The plugin has been shut down, i.e. the plugin's IPlugin::aboutToShutdown() method has been called.
|
The plugin has been shut down, i.e. the plugin's IPlugin::aboutToShutdown() function has been called.
|
||||||
\value Deleted
|
\value Deleted
|
||||||
The plugin instance has been deleted.
|
The plugin instance has been deleted.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -751,7 +751,7 @@ public:
|
|||||||
: AST(Kind_StructField), name(_name), type(0) {}
|
: AST(Kind_StructField), name(_name), type(0) {}
|
||||||
|
|
||||||
// Takes the outer shell of an array type with the innermost
|
// Takes the outer shell of an array type with the innermost
|
||||||
// element type set to null. The fixInnerTypes() method will
|
// element type set to null. The fixInnerTypes() function will
|
||||||
// set the innermost element type to a meaningful value.
|
// set the innermost element type to a meaningful value.
|
||||||
Field(const QString *_name, TypeAST *_type)
|
Field(const QString *_name, TypeAST *_type)
|
||||||
: AST(Kind_StructField), name(_name), type(_type) {}
|
: AST(Kind_StructField), name(_name), type(_type) {}
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ void QPacketProtocol::clear()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the next unread packet, or an invalid QPacket instance if no packets
|
Returns the next unread packet, or an invalid QPacket instance if no packets
|
||||||
are available. This method does NOT block.
|
are available. This function does NOT block.
|
||||||
*/
|
*/
|
||||||
QPacket QPacketProtocol::read()
|
QPacket QPacketProtocol::read()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
QmlError includes a textual description of the error, as well
|
QmlError includes a textual description of the error, as well
|
||||||
as location information (the file, line, and column). The toString()
|
as location information (the file, line, and column). The toString()
|
||||||
method creates a single-line, human-readable string containing all of
|
function creates a single-line, human-readable string containing all of
|
||||||
this information, for example:
|
this information, for example:
|
||||||
\code
|
\code
|
||||||
file:///home/user/test.qml:7:8: Invalid property assignment: double expected
|
file:///home/user/test.qml:7:8: Invalid property assignment: double expected
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
You can use qDebug() or qWarning() to output errors to the console. This method
|
You can use qDebug() or qWarning() to output errors to the console. This function
|
||||||
will attempt to open the file indicated by the error
|
will attempt to open the file indicated by the error
|
||||||
and include additional contextual information.
|
and include additional contextual information.
|
||||||
\code
|
\code
|
||||||
|
|||||||
@@ -1464,7 +1464,7 @@ bool Check::visit(TypeOfExpression *ast)
|
|||||||
|
|
||||||
/// When something is changed here, also change ReadingContext::lookupProperty in
|
/// When something is changed here, also change ReadingContext::lookupProperty in
|
||||||
/// texttomodelmerger.cpp
|
/// texttomodelmerger.cpp
|
||||||
/// ### Maybe put this into the context as a helper method.
|
/// ### Maybe put this into the context as a helper function.
|
||||||
const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
|
const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
|
||||||
{
|
{
|
||||||
if (!_importsOk)
|
if (!_importsOk)
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ using namespace QmlJS;
|
|||||||
|
|
||||||
Example: Pass in the AST for "1 + 2" and NumberValue will be returned.
|
Example: Pass in the AST for "1 + 2" and NumberValue will be returned.
|
||||||
|
|
||||||
In normal cases only the call operator (or the equivalent value() method)
|
In normal cases only the call operator (or the equivalent value() function)
|
||||||
will be used.
|
will be used.
|
||||||
|
|
||||||
The reference() method has the special behavior of not resolving \l{Reference}s
|
The reference() function has the special behavior of not resolving \l{Reference}s
|
||||||
which can be useful when interested in the identity of a variable instead
|
which can be useful when interested in the identity of a variable instead
|
||||||
of its value.
|
of its value.
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Internal {
|
|||||||
* For a single qrc a given path maps to a single file, but when one has multiple
|
* For a single qrc a given path maps to a single file, but when one has multiple
|
||||||
* (platform specific exclusive) qrc files, then multiple files match, so QStringList are used.
|
* (platform specific exclusive) qrc files, then multiple files match, so QStringList are used.
|
||||||
*
|
*
|
||||||
* Especially the collect* methods are thought as low level interface.
|
* Especially the collect* functions are thought as low level interface.
|
||||||
*/
|
*/
|
||||||
class QrcParserPrivate
|
class QrcParserPrivate
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ using namespace QmlJS;
|
|||||||
a specific location.
|
a specific location.
|
||||||
\sa Document Context ScopeBuilder
|
\sa Document Context ScopeBuilder
|
||||||
|
|
||||||
A ScopeChain is used to perform global lookup with the lookup() method and
|
A ScopeChain is used to perform global lookup with the lookup() function and
|
||||||
to access information about the enclosing scopes.
|
to access information about the enclosing scopes.
|
||||||
|
|
||||||
Once constructed for a Document in a Context it represents the root scope of
|
Once constructed for a Document in a Context it represents the root scope of
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ enum { debug = 0 };
|
|||||||
\brief The SymbolGroup class creates a symbol group storing a tree of
|
\brief The SymbolGroup class creates a symbol group storing a tree of
|
||||||
expanded symbols rooted on a fake "locals" root element.
|
expanded symbols rooted on a fake "locals" root element.
|
||||||
|
|
||||||
Provides a find() method based on inames ("locals.this.i1.data") and
|
Provides a find() function based on inames ("locals.this.i1.data") and
|
||||||
dump() methods used for GDBMI-format dumping and debug helpers.
|
dump() functions used for GDBMI-format dumping and debug helpers.
|
||||||
Qt Creator's WatchModel is fed from this class. It basically represents the
|
Qt Creator's WatchModel is fed from this class. It basically represents the
|
||||||
symbol group tree with some additional node types (Reference and Map Node
|
symbol group tree with some additional node types (Reference and Map Node
|
||||||
types.
|
types.
|
||||||
|
|||||||
@@ -42,15 +42,15 @@ namespace Utils {
|
|||||||
Also, one instance of this class should not handle multiple streams (at least not
|
Also, one instance of this class should not handle multiple streams (at least not
|
||||||
at the same time).
|
at the same time).
|
||||||
|
|
||||||
Its main method is parseText(), which accepts text and default QTextCharFormat.
|
Its main function is parseText(), which accepts text and default QTextCharFormat.
|
||||||
This method is designed to parse text and split colored text to smaller strings,
|
This function is designed to parse text and split colored text to smaller strings,
|
||||||
with their appropriate formatting information set inside QTextCharFormat.
|
with their appropriate formatting information set inside QTextCharFormat.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
\list
|
\list
|
||||||
\li Create new instance of AnsiEscapeCodeHandler for a stream.
|
\li Create new instance of AnsiEscapeCodeHandler for a stream.
|
||||||
\li To add new text, call parseText() with the text and a default QTextCharFormat.
|
\li To add new text, call parseText() with the text and a default QTextCharFormat.
|
||||||
The result of this method is a list of strings with formats set in appropriate
|
The result of this function is a list of strings with formats set in appropriate
|
||||||
QTextCharFormat.
|
QTextCharFormat.
|
||||||
\endlist
|
\endlist
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ void FileInProjectFinder::setSysroot(const QString &sysroot)
|
|||||||
/*!
|
/*!
|
||||||
Returns the best match for the given file URL in the project directory.
|
Returns the best match for the given file URL in the project directory.
|
||||||
|
|
||||||
The method first checks whether the file inside the project directory exists.
|
The function first checks whether the file inside the project directory exists.
|
||||||
If not, the leading directory in the path is stripped, and the - now shorter - path is
|
If not, the leading directory in the path is stripped, and the - now shorter - path is
|
||||||
checked for existence, and so on. Second, it tries to locate the file in the sysroot
|
checked for existence, and so on. Second, it tries to locate the file in the sysroot
|
||||||
folder specified. Third, we walk the list of project files, and search for a file name match
|
folder specified. Third, we walk the list of project files, and search for a file name match
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ void JsonSchema::enterNestedPropertySchema(const QString &property)
|
|||||||
/*!
|
/*!
|
||||||
* An array schema is allowed to have its \e items specification in the form of
|
* An array schema is allowed to have its \e items specification in the form of
|
||||||
* another schema
|
* another schema
|
||||||
* or in the form of an array of schemas [Sec. 5.5]. This methods checks whether this is case
|
* or in the form of an array of schemas [Sec. 5.5]. This functions checks whether this is case
|
||||||
* in which the items are a schema.
|
* in which the items are a schema.
|
||||||
*
|
*
|
||||||
* Returns whether or not the items from the array are a schema.
|
* Returns whether or not the items from the array are a schema.
|
||||||
@@ -340,7 +340,7 @@ void JsonSchema::enterNestedItemSchema()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* An array schema is allowed to have its \e items specification in the form of another schema
|
* An array schema is allowed to have its \e items specification in the form of another schema
|
||||||
* or in the form of an array of schemas [Sec. 5.5]. This methods checks whether this is case
|
* or in the form of an array of schemas [Sec. 5.5]. This functions checks whether this is case
|
||||||
* in which the items are an array of schemas.
|
* in which the items are an array of schemas.
|
||||||
*
|
*
|
||||||
* Returns whether or not the items from the array are a an array of schemas.
|
* Returns whether or not the items from the array are a an array of schemas.
|
||||||
@@ -366,7 +366,7 @@ int JsonSchema::itemArraySchemaSize() const
|
|||||||
* interested on). This shall only happen if the item at the supplied array index is of type
|
* interested on). This shall only happen if the item at the supplied array index is of type
|
||||||
* object, which is then assumed to be a schema.
|
* object, which is then assumed to be a schema.
|
||||||
*
|
*
|
||||||
* The method also marks the context as being inside an array evaluation.
|
* The function also marks the context as being inside an array evaluation.
|
||||||
*
|
*
|
||||||
* Returns whether it was necessary to enter a schema for the supplied
|
* Returns whether it was necessary to enter a schema for the supplied
|
||||||
* array \a index, false if index is out of bounds.
|
* array \a index, false if index is out of bounds.
|
||||||
@@ -383,7 +383,7 @@ bool JsonSchema::maybeEnterNestedArraySchema(int index)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* The type of a schema can be specified in the form of a union type, which is basically an
|
* The type of a schema can be specified in the form of a union type, which is basically an
|
||||||
* array of allowed types for the particular instance [Sec. 5.1]. This method checks whether
|
* array of allowed types for the particular instance [Sec. 5.1]. This function checks whether
|
||||||
* the current schema is one of such.
|
* the current schema is one of such.
|
||||||
*
|
*
|
||||||
* Returns whether or not the current schema specifies a union type.
|
* Returns whether or not the current schema specifies a union type.
|
||||||
@@ -405,7 +405,7 @@ int JsonSchema::unionSchemaSize() const
|
|||||||
* This shall only happen if the item at the supplied union \a index, which is then assumed to be
|
* This shall only happen if the item at the supplied union \a index, which is then assumed to be
|
||||||
* a schema.
|
* a schema.
|
||||||
*
|
*
|
||||||
* The method also marks the context as being inside an union evaluation.
|
* The function also marks the context as being inside an union evaluation.
|
||||||
*
|
*
|
||||||
* Returns whether or not it was necessary to enter a schema for the
|
* Returns whether or not it was necessary to enter a schema for the
|
||||||
* supplied union index.
|
* supplied union index.
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ class JsonSchemaManager;
|
|||||||
* corresponding nested schema. Afterwards, it's expected that one would "leave" such nested
|
* corresponding nested schema. Afterwards, it's expected that one would "leave" such nested
|
||||||
* schema.
|
* schema.
|
||||||
*
|
*
|
||||||
* All methods assume that the current "context" is a valid schema. Once an instance of this
|
* All functions assume that the current "context" is a valid schema. Once an instance of this
|
||||||
* class is created the root schema is put on top of the stack.
|
* class is created the root schema is put on top of the stack.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -350,7 +350,7 @@ private:
|
|||||||
|
|
||||||
QStringList properties(JsonObjectValue *v) const;
|
QStringList properties(JsonObjectValue *v) const;
|
||||||
JsonObjectValue *propertySchema(const QString &property, JsonObjectValue *v) const;
|
JsonObjectValue *propertySchema(const QString &property, JsonObjectValue *v) const;
|
||||||
// TODO: Similar methods for other attributes which require looking into base schemas.
|
// TODO: Similar functions for other attributes which require looking into base schemas.
|
||||||
|
|
||||||
static bool maybeSchemaName(const QString &s);
|
static bool maybeSchemaName(const QString &s);
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ bool ToolTip::acceptShow(const TipContent &content,
|
|||||||
}
|
}
|
||||||
#if !defined(QT_NO_EFFECTS) && !defined(Q_OS_MAC)
|
#if !defined(QT_NO_EFFECTS) && !defined(Q_OS_MAC)
|
||||||
// While the effect takes places it might be that although the widget is actually on
|
// While the effect takes places it might be that although the widget is actually on
|
||||||
// screen the isVisible method doesn't return true.
|
// screen the isVisible function doesn't return true.
|
||||||
else if (m_tip
|
else if (m_tip
|
||||||
&& (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)
|
&& (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)
|
||||||
|| QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))) {
|
|| QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))) {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ private:
|
|||||||
const QStringList &files);
|
const QStringList &files);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for buildFileNodeTree(): Inserts a new folder-node for
|
* Helper function for buildFileNodeTree(): Inserts a new folder-node for
|
||||||
* the directory \p nodeDir and inserts it into \p nodes. If no parent
|
* the directory \p nodeDir and inserts it into \p nodes. If no parent
|
||||||
* folder exists, it will be created recursively.
|
* folder exists, it will be created recursively.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ private:
|
|||||||
AutotoolsProject *m_project;
|
AutotoolsProject *m_project;
|
||||||
Core::IDocument *m_projectFile;
|
Core::IDocument *m_projectFile;
|
||||||
|
|
||||||
// TODO: AutotoolsProject calls the protected method addFileNodes() from AutotoolsProjectNode.
|
// TODO: AutotoolsProject calls the protected function addFileNodes() from AutotoolsProjectNode.
|
||||||
// Instead of this friend declaration, a public interface might be preferable.
|
// Instead of this friend declaration, a public interface might be preferable.
|
||||||
friend class AutotoolsProject;
|
friend class AutotoolsProject;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses the makefile. Must be invoked at least once, otherwise
|
* Parses the makefile. Must be invoked at least once, otherwise
|
||||||
* the getter methods of MakefileParser will return empty values.
|
* the getter functions of MakefileParser will return empty values.
|
||||||
* @return True, if the parsing was successful. If false is returned,
|
* @return True, if the parsing was successful. If false is returned,
|
||||||
* the makefile could not be opened.
|
* the makefile could not be opened.
|
||||||
*/
|
*/
|
||||||
@@ -116,15 +116,15 @@ public:
|
|||||||
QStringList cxxflags() const;
|
QStringList cxxflags() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancels the parsing. Calling this method only makes sense, if the
|
* Cancels the parsing. Calling this function only makes sense, if the
|
||||||
* parser runs in a different thread than the caller of this method.
|
* parser runs in a different thread than the caller of this function.
|
||||||
* The method is thread-safe.
|
* The function is thread-safe.
|
||||||
*/
|
*/
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return True, if the parser has been cancelled by MakefileParser::cancel().
|
* @return True, if the parser has been cancelled by MakefileParser::cancel().
|
||||||
* The method is thread-safe.
|
* The function is thread-safe.
|
||||||
*/
|
*/
|
||||||
bool isCanceled() const;
|
bool isCanceled() const;
|
||||||
|
|
||||||
@@ -176,14 +176,14 @@ private:
|
|||||||
void parseSubDirs();
|
void parseSubDirs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for parseDefaultExtensions(). Returns recursively all sources
|
* Helper function for parseDefaultExtensions(). Returns recursively all sources
|
||||||
* inside the directory \p directory that match with the extension \p extension.
|
* inside the directory \p directory that match with the extension \p extension.
|
||||||
*/
|
*/
|
||||||
QStringList directorySources(const QString &directory,
|
QStringList directorySources(const QString &directory,
|
||||||
const QStringList &extensions);
|
const QStringList &extensions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for all parse-methods. Returns each value of a target as string in
|
* Helper function for all parse-functions. Returns each value of a target as string in
|
||||||
* the stringlist. The current line m_line is used as starting point and increased
|
* the stringlist. The current line m_line is used as starting point and increased
|
||||||
* if the current line ends with a \.
|
* if the current line ends with a \.
|
||||||
*
|
*
|
||||||
@@ -205,7 +205,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Adds recursively all sources of the current folder to m_sources and removes
|
* Adds recursively all sources of the current folder to m_sources and removes
|
||||||
* all duplicates. The Makefile.am is not parsed, only the folders and files are
|
* all duplicates. The Makefile.am is not parsed, only the folders and files are
|
||||||
* handled. This method should only be called, if the sources parsing in the Makefile.am
|
* handled. This function should only be called, if the sources parsing in the Makefile.am
|
||||||
* failed because variables (e.g. $(test)) have been used.
|
* failed because variables (e.g. $(test)) have been used.
|
||||||
*/
|
*/
|
||||||
void addAllSources();
|
void addAllSources();
|
||||||
@@ -218,7 +218,7 @@ private:
|
|||||||
void parseIncludePaths();
|
void parseIncludePaths();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for MakefileParser::directorySources(). Appends the name of the headerfile
|
* Helper function for MakefileParser::directorySources(). Appends the name of the headerfile
|
||||||
* to \p list, if the header could be found in the directory specified by \p dir.
|
* to \p list, if the header could be found in the directory specified by \p dir.
|
||||||
* The headerfile base name is defined by \p fileName.
|
* The headerfile base name is defined by \p fileName.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ protected:
|
|||||||
bool submitEditorAboutToClose();
|
bool submitEditorAboutToClose();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Functions
|
||||||
void createMenu();
|
void createMenu();
|
||||||
void createSubmitEditorActions();
|
void createSubmitEditorActions();
|
||||||
void createFileActions(const Core::Context &context);
|
void createFileActions(const Core::Context &context);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace Internal {
|
|||||||
\class NavigationWidgetPrivate
|
\class NavigationWidgetPrivate
|
||||||
|
|
||||||
The NavigationWidgetPrivate class provides internal data structures and
|
The NavigationWidgetPrivate class provides internal data structures and
|
||||||
methods for NavigationWidget.
|
functions for NavigationWidget.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class NavigationWidgetPrivate
|
class NavigationWidgetPrivate
|
||||||
@@ -256,7 +256,7 @@ void NavigationWidget::onItemActivated(const QModelIndex &index)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Receives new data for the tree. \a result is a pointer to the Class View
|
Receives new data for the tree. \a result is a pointer to the Class View
|
||||||
model root item. The method does nothing if null is passed.
|
model root item. The function does nothing if null is passed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
|
void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ QString CMakeManager::findCbpFile(const QDir &directory)
|
|||||||
{
|
{
|
||||||
// Find the cbp file
|
// Find the cbp file
|
||||||
// the cbp file is named like the project() command in the CMakeList.txt file
|
// the cbp file is named like the project() command in the CMakeList.txt file
|
||||||
// so this method below could find the wrong cbp file, if the user changes the project()
|
// so this function below could find the wrong cbp file, if the user changes the project()
|
||||||
// 2name
|
// 2name
|
||||||
QDateTime t;
|
QDateTime t;
|
||||||
QString file;
|
QString file;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ using namespace Core::Internal;
|
|||||||
|
|
||||||
You don't create instances of this class directly, but instead use the
|
You don't create instances of this class directly, but instead use the
|
||||||
\l{ActionManager::createMenu()}
|
\l{ActionManager::createMenu()}
|
||||||
and \l{ActionManager::createMenuBar()} methods.
|
and \l{ActionManager::createMenuBar()} functions.
|
||||||
Retrieve existing action containers for an ID with
|
Retrieve existing action containers for an ID with
|
||||||
\l{ActionManager::actionContainer()}.
|
\l{ActionManager::actionContainer()}.
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ using namespace Core::Internal;
|
|||||||
menu items and keyboard shortcuts.
|
menu items and keyboard shortcuts.
|
||||||
|
|
||||||
The ActionManager is the central bookkeeper of actions and their shortcuts and layout.
|
The ActionManager is the central bookkeeper of actions and their shortcuts and layout.
|
||||||
It is a singleton containing mostly static methods. If you need access to the instance,
|
It is a singleton containing mostly static functions. If you need access to the instance,
|
||||||
e.g. for connecting to signals, is its ActionManager::instance() method.
|
e.g. for connecting to signals, is its ActionManager::instance() function.
|
||||||
|
|
||||||
The main reasons for the need of this class is to provide a central place where the user
|
The main reasons for the need of this class is to provide a central place where the user
|
||||||
can specify all his keyboard shortcuts, and to provide a solution for actions that should
|
can specify all his keyboard shortcuts, and to provide a solution for actions that should
|
||||||
@@ -92,7 +92,7 @@ using namespace Core::Internal;
|
|||||||
\section1 Registering Actions
|
\section1 Registering Actions
|
||||||
|
|
||||||
To register a globally active action "My Action"
|
To register a globally active action "My Action"
|
||||||
put the following in your plugin's IPlugin::initialize method:
|
put the following in your plugin's IPlugin::initialize function:
|
||||||
\code
|
\code
|
||||||
QAction *myAction = new QAction(tr("My Action"), this);
|
QAction *myAction = new QAction(tr("My Action"), this);
|
||||||
Core::Command *cmd = Core::ActionManager::registerAction(myAction,
|
Core::Command *cmd = Core::ActionManager::registerAction(myAction,
|
||||||
@@ -113,7 +113,7 @@ using namespace Core::Internal;
|
|||||||
Also use the ActionManager to add items to registered
|
Also use the ActionManager to add items to registered
|
||||||
action containers like the applications menu bar or menus in that menu bar.
|
action containers like the applications menu bar or menus in that menu bar.
|
||||||
To do this, you register your action via the
|
To do this, you register your action via the
|
||||||
registerAction methods, get the action container for a specific ID (like specified in
|
registerAction functions, get the action container for a specific ID (like specified in
|
||||||
the Core::Constants namespace) with a call of
|
the Core::Constants namespace) with a call of
|
||||||
actionContainer(const Id&) and add your command to this container.
|
actionContainer(const Id&) and add your command to this container.
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ using namespace Core::Internal;
|
|||||||
\list
|
\list
|
||||||
\li Always register your actions and shortcuts!
|
\li Always register your actions and shortcuts!
|
||||||
\li Register your actions and shortcuts during your plugin's \l{ExtensionSystem::IPlugin::initialize()}
|
\li Register your actions and shortcuts during your plugin's \l{ExtensionSystem::IPlugin::initialize()}
|
||||||
or \l{ExtensionSystem::IPlugin::extensionsInitialized()} methods, otherwise the shortcuts won't appear
|
or \l{ExtensionSystem::IPlugin::extensionsInitialized()} functions, otherwise the shortcuts won't appear
|
||||||
in the keyboard settings dialog from the beginning.
|
in the keyboard settings dialog from the beginning.
|
||||||
\li When registering an action with \c{cmd=registerAction(action, id, contexts)} be sure to connect
|
\li When registering an action with \c{cmd=registerAction(action, id, contexts)} be sure to connect
|
||||||
your own action \c{connect(action, SIGNAL...)} but make \c{cmd->action()} visible to the user, i.e.
|
your own action \c{connect(action, SIGNAL...)} but make \c{cmd->action()} visible to the user, i.e.
|
||||||
@@ -176,7 +176,7 @@ ActionManager *ActionManager::instance()
|
|||||||
or to add menu items to the menu. The ActionManager owns
|
or to add menu items to the menu. The ActionManager owns
|
||||||
the returned ActionContainer.
|
the returned ActionContainer.
|
||||||
Add your menu to some other menu or a menu bar via the
|
Add your menu to some other menu or a menu bar via the
|
||||||
ActionManager::actionContainer and ActionContainer::addMenu methods.
|
ActionManager::actionContainer and ActionContainer::addMenu functions.
|
||||||
*/
|
*/
|
||||||
ActionContainer *ActionManager::createMenu(Id id)
|
ActionContainer *ActionManager::createMenu(Id id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -162,13 +162,13 @@ void WizardEventLoop::rejected()
|
|||||||
\brief The BaseFileWizard class implements a generic wizard for
|
\brief The BaseFileWizard class implements a generic wizard for
|
||||||
creating files.
|
creating files.
|
||||||
|
|
||||||
The following abstract methods must be implemented:
|
The following abstract functions must be implemented:
|
||||||
\list
|
\list
|
||||||
\li createWizardDialog(): Called to create the QWizard dialog to be shown.
|
\li createWizardDialog(): Called to create the QWizard dialog to be shown.
|
||||||
\li generateFiles(): Generates file content.
|
\li generateFiles(): Generates file content.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
The behaviour can be further customized by overwriting the virtual method \c postGenerateFiles(),
|
The behaviour can be further customized by overwriting the virtual function \c postGenerateFiles(),
|
||||||
which is called after generating the files.
|
which is called after generating the files.
|
||||||
|
|
||||||
\sa Core::GeneratedFile, Core::BaseFileWizardParameters, Core::StandardFileWizard
|
\sa Core::GeneratedFile, Core::BaseFileWizardParameters, Core::StandardFileWizard
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
instead use one of the predefined wizards and adapt it to your needs.
|
instead use one of the predefined wizards and adapt it to your needs.
|
||||||
|
|
||||||
To make your wizard known to the system, add your IWizard instance to the
|
To make your wizard known to the system, add your IWizard instance to the
|
||||||
plugin manager's object pool in your plugin's initialize method:
|
plugin manager's object pool in your plugin's initialize function:
|
||||||
\code
|
\code
|
||||||
bool MyPlugin::initialize(const QStringList &arguments, QString *errorString)
|
bool MyPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||||
{
|
{
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
const QString &platform,
|
const QString &platform,
|
||||||
const QVariantMap &variables)
|
const QVariantMap &variables)
|
||||||
|
|
||||||
This method is executed when the wizard has been selected by the user
|
This function is executed when the wizard has been selected by the user
|
||||||
for execution. Any dialogs the wizard opens should use the given \a parent.
|
for execution. Any dialogs the wizard opens should use the given \a parent.
|
||||||
The \a path argument is a suggestion for the location where files should be
|
The \a path argument is a suggestion for the location where files should be
|
||||||
created. The wizard should fill this in its path selection elements as a
|
created. The wizard should fill this in its path selection elements as a
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
as expected. On expected file changes all IDocument objects are notified to reload
|
as expected. On expected file changes all IDocument objects are notified to reload
|
||||||
themselves.
|
themselves.
|
||||||
|
|
||||||
The DocumentManager service also provides two convenience methods for saving
|
The DocumentManager service also provides two convenience functions for saving
|
||||||
files: \c saveModifiedFiles() and \c saveModifiedFilesSilently(). Both take a list
|
files: \c saveModifiedFiles() and \c saveModifiedFilesSilently(). Both take a list
|
||||||
of FileInterfaces as an argument, and return the list of files which were
|
of FileInterfaces as an argument, and return the list of files which were
|
||||||
_not_ saved.
|
_not_ saved.
|
||||||
@@ -517,7 +517,7 @@ void DocumentManager::expectFileChange(const QString &fileName)
|
|||||||
d->m_expectedFileNames.insert(fileName);
|
d->m_expectedFileNames.insert(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* only called from unblock and unexpect file change methods */
|
/* only called from unblock and unexpect file change functions */
|
||||||
static void updateExpectedState(const QString &fileName)
|
static void updateExpectedState(const QString &fileName)
|
||||||
{
|
{
|
||||||
if (fileName.isEmpty())
|
if (fileName.isEmpty())
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
static void setCurrentFile(const QString &filePath);
|
static void setCurrentFile(const QString &filePath);
|
||||||
static QString currentFile();
|
static QString currentFile();
|
||||||
|
|
||||||
// helper methods
|
// helper functions
|
||||||
static QString fixFileName(const QString &fileName, FixMode fixmode);
|
static QString fixFileName(const QString &fileName, FixMode fixmode);
|
||||||
|
|
||||||
static bool saveDocument(IDocument *document, const QString &fileName = QString(), bool *isReadOnly = 0);
|
static bool saveDocument(IDocument *document, const QString &fileName = QString(), bool *isReadOnly = 0);
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public:
|
|||||||
QList<IEditor *> editorsForDocuments(const QList<IDocument *> &documents) const;
|
QList<IEditor *> editorsForDocuments(const QList<IDocument *> &documents) const;
|
||||||
QList<IEditor *> oneEditorForEachOpenedDocument() const;
|
QList<IEditor *> oneEditorForEachOpenedDocument() const;
|
||||||
|
|
||||||
// editor manager related methods, nobody else should call it
|
// editor manager related functions, nobody else should call it
|
||||||
void addEditor(IEditor *editor, bool *isNewDocument);
|
void addEditor(IEditor *editor, bool *isNewDocument);
|
||||||
void addRestoredDocument(const QString &fileName, const QString &displayName, const Id &id);
|
void addRestoredDocument(const QString &fileName, const QString &displayName, const Id &id);
|
||||||
Entry *firstRestoredDocument() const;
|
Entry *firstRestoredDocument() const;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ using namespace Utils;
|
|||||||
own overlay icon handling (Mac/Windows).
|
own overlay icon handling (Mac/Windows).
|
||||||
|
|
||||||
Plugins can register custom overlay icons via registerIconOverlayForSuffix(), and
|
Plugins can register custom overlay icons via registerIconOverlayForSuffix(), and
|
||||||
retrieve icons via the icon() method.
|
retrieve icons via the icon() function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Cache icons in a list of pairs suffix/icon which should be faster than
|
// Cache icons in a list of pairs suffix/icon which should be faster than
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
Returns the absolute path in the users directory that is used for
|
Returns the absolute path in the users directory that is used for
|
||||||
resources like project templates.
|
resources like project templates.
|
||||||
|
|
||||||
Use this method for finding the place for resources that the user may
|
Use this function for finding the place for resources that the user may
|
||||||
write to, for example, to allow for custom palettes or templates.
|
write to, for example, to allow for custom palettes or templates.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
Enables plugins to perform some pre-end-of-life actions.
|
Enables plugins to perform some pre-end-of-life actions.
|
||||||
|
|
||||||
The application is guaranteed to shut down after this signal is emitted.
|
The application is guaranteed to shut down after this signal is emitted.
|
||||||
It is there as an addition to the usual plugin lifecycle methods, namely
|
It is there as an addition to the usual plugin lifecycle functions, namely
|
||||||
\c IPlugin::aboutToShutdown(), just for convenience.
|
\c IPlugin::aboutToShutdown(), just for convenience.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
Guidelines for implementing the class:
|
Guidelines for implementing the class:
|
||||||
\list
|
\list
|
||||||
\li Return \c false from the implemented method if you want to prevent
|
\li Return \c false from the implemented function if you want to prevent
|
||||||
the event.
|
the event.
|
||||||
\li Add your implementing object to the plugin managers objects:
|
\li Add your implementing object to the plugin managers objects:
|
||||||
\c{ExtensionSystem::PluginManager::instance()->addObject(yourImplementingObject)}
|
\c{ExtensionSystem::PluginManager::instance()->addObject(yourImplementingObject)}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ using namespace Core::Internal;
|
|||||||
The progress indicator also allows the user to cancel the task.
|
The progress indicator also allows the user to cancel the task.
|
||||||
|
|
||||||
You get the single instance of this class via the
|
You get the single instance of this class via the
|
||||||
Core::ICore::progressManager() method.
|
Core::ICore::progressManager() function.
|
||||||
|
|
||||||
\section1 Registering a task
|
\section1 Registering a task
|
||||||
The ProgressManager API uses QtConcurrent as the basis for defining
|
The ProgressManager API uses QtConcurrent as the basis for defining
|
||||||
@@ -110,7 +110,7 @@ using namespace Core::Internal;
|
|||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
To register a task you create your \c QFuture<void> object, and call
|
To register a task you create your \c QFuture<void> object, and call
|
||||||
addTask(). This method returns a
|
addTask(). This function returns a
|
||||||
\l{Core::FutureProgress}{FutureProgress}
|
\l{Core::FutureProgress}{FutureProgress}
|
||||||
object that you can use to further customize the progress bar's appearance.
|
object that you can use to further customize the progress bar's appearance.
|
||||||
See the \l{Core::FutureProgress}{FutureProgress} documentation for
|
See the \l{Core::FutureProgress}{FutureProgress} documentation for
|
||||||
@@ -122,16 +122,16 @@ using namespace Core::Internal;
|
|||||||
\section2 Create a threaded task with QtConcurrent
|
\section2 Create a threaded task with QtConcurrent
|
||||||
The first option is to directly use QtConcurrent to actually
|
The first option is to directly use QtConcurrent to actually
|
||||||
start a task concurrently in a different thread.
|
start a task concurrently in a different thread.
|
||||||
QtConcurrent has several different methods to run e.g.
|
QtConcurrent has several different functions to run e.g.
|
||||||
a class method in a different thread. Qt Creator itself
|
a class function in a different thread. Qt Creator itself
|
||||||
adds a few more in \c{src/libs/qtconcurrent/runextensions.h}.
|
adds a few more in \c{src/libs/qtconcurrent/runextensions.h}.
|
||||||
The QtConcurrent methods to run a concurrent task return a
|
The QtConcurrent functions to run a concurrent task return a
|
||||||
\c QFuture object. This is what you want to give the
|
\c QFuture object. This is what you want to give the
|
||||||
ProgressManager in the addTask() method.
|
ProgressManager in the addTask() function.
|
||||||
|
|
||||||
Have a look at e.g Locator::ILocatorFilter. Locator filters implement
|
Have a look at e.g Locator::ILocatorFilter. Locator filters implement
|
||||||
a method \c refresh which takes a \c QFutureInterface object
|
a function \c refresh which takes a \c QFutureInterface object
|
||||||
as a parameter. These methods look something like:
|
as a parameter. These functions look something like:
|
||||||
\code
|
\code
|
||||||
void Filter::refresh(QFutureInterface<void> &future) {
|
void Filter::refresh(QFutureInterface<void> &future) {
|
||||||
future.setProgressRange(0, MAX);
|
future.setProgressRange(0, MAX);
|
||||||
@@ -145,7 +145,7 @@ using namespace Core::Internal;
|
|||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
The actual refresh, which calls all the filters' refresh methods
|
The actual refresh, which calls all the filters' refresh functions
|
||||||
in a different thread, looks like this:
|
in a different thread, looks like this:
|
||||||
\code
|
\code
|
||||||
QFuture<void> task = QtConcurrent::run(&ILocatorFilter::refresh, filters);
|
QFuture<void> task = QtConcurrent::run(&ILocatorFilter::refresh, filters);
|
||||||
@@ -154,7 +154,7 @@ using namespace Core::Internal;
|
|||||||
Locator::Constants::TASK_INDEX);
|
Locator::Constants::TASK_INDEX);
|
||||||
\endcode
|
\endcode
|
||||||
First, we tell QtConcurrent to start a thread which calls all the filters'
|
First, we tell QtConcurrent to start a thread which calls all the filters'
|
||||||
refresh method. After that we register the returned QFuture object
|
refresh function. After that we register the returned QFuture object
|
||||||
with the ProgressManager.
|
with the ProgressManager.
|
||||||
|
|
||||||
\section2 Manually create QtConcurrent objects for your thread
|
\section2 Manually create QtConcurrent objects for your thread
|
||||||
@@ -184,7 +184,7 @@ using namespace Core::Internal;
|
|||||||
We register the task with the ProgressManager, using the internal
|
We register the task with the ProgressManager, using the internal
|
||||||
QFuture object that has been created for our QFutureInterface object.
|
QFuture object that has been created for our QFutureInterface object.
|
||||||
Next we report that the task has begun and start doing our actual
|
Next we report that the task has begun and start doing our actual
|
||||||
work, regularly reporting the progress via the methods
|
work, regularly reporting the progress via the functions
|
||||||
in QFutureInterface. After the long taking operation has finished,
|
in QFutureInterface. After the long taking operation has finished,
|
||||||
we report so through the QFutureInterface object, and delete it
|
we report so through the QFutureInterface object, and delete it
|
||||||
afterwards.
|
afterwards.
|
||||||
@@ -192,7 +192,7 @@ using namespace Core::Internal;
|
|||||||
\section1 Customizing progress appearance
|
\section1 Customizing progress appearance
|
||||||
|
|
||||||
You can set a custom widget to show below the progress bar itself,
|
You can set a custom widget to show below the progress bar itself,
|
||||||
using the FutureProgress object returned by the addTask() method.
|
using the FutureProgress object returned by the addTask() function.
|
||||||
Also use this object to get notified when the user clicks on the
|
Also use this object to get notified when the user clicks on the
|
||||||
progress indicator.
|
progress indicator.
|
||||||
*/
|
*/
|
||||||
@@ -231,8 +231,8 @@ using namespace Core::Internal;
|
|||||||
which can be used to further customize. The FutureProgress object's
|
which can be used to further customize. The FutureProgress object's
|
||||||
life is managed by the ProgressManager and is guaranteed to live only until
|
life is managed by the ProgressManager and is guaranteed to live only until
|
||||||
the next event loop cycle, or until the next call of addTask.
|
the next event loop cycle, or until the next call of addTask.
|
||||||
If you want to use the returned FutureProgress later than directly after calling this method,
|
If you want to use the returned FutureProgress later than directly after calling this function,
|
||||||
you will need to use protective methods (like wrapping the returned object in QPointer and
|
you will need to use protective functions (like wrapping the returned object in QPointer and
|
||||||
checking for 0 whenever you use it).
|
checking for 0 whenever you use it).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ using namespace Core;
|
|||||||
*
|
*
|
||||||
* The variable chooser monitors focus changes of all children of its parent widget.
|
* The variable chooser monitors focus changes of all children of its parent widget.
|
||||||
* When a text control gets focus, the variable chooser checks if it has variable support set,
|
* When a text control gets focus, the variable chooser checks if it has variable support set,
|
||||||
* either through the addVariableSupport() method or by manually setting the
|
* either through the addVariableSupport() function or by manually setting the
|
||||||
* custom kVariableSupportProperty on the control. If the control supports variables,
|
* custom kVariableSupportProperty on the control. If the control supports variables,
|
||||||
* a tool button which opens the variable chooser is shown in it while it has focus.
|
* a tool button which opens the variable chooser is shown in it while it has focus.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -122,9 +122,9 @@ public:
|
|||||||
If there are conditions where your variable is not valid, you should call
|
If there are conditions where your variable is not valid, you should call
|
||||||
VariableManager::remove(kMyVariable) in updateVariable().
|
VariableManager::remove(kMyVariable) in updateVariable().
|
||||||
|
|
||||||
For variables that refer to a file, you should use the convenience methods
|
For variables that refer to a file, you should use the convenience functions
|
||||||
VariableManager::registerFileVariables(), VariableManager::fileVariableValue() and
|
VariableManager::registerFileVariables(), VariableManager::fileVariableValue() and
|
||||||
VariableManager::isFileVariable(). The methods take a variable prefix, like \c MyFileVariable,
|
VariableManager::isFileVariable(). The functions take a variable prefix, like \c MyFileVariable,
|
||||||
and automatically handle standardized postfixes like \c{:FilePath},
|
and automatically handle standardized postfixes like \c{:FilePath},
|
||||||
\c{:Path} and \c{:FileBaseName}, resulting in the combined variables, such as
|
\c{:Path} and \c{:FileBaseName}, resulting in the combined variables, such as
|
||||||
\c{MyFileVariable:FilePath}.
|
\c{MyFileVariable:FilePath}.
|
||||||
@@ -162,12 +162,12 @@ public:
|
|||||||
\li Using VariableManager::expandedString(). This is the most comfortable way to get a string
|
\li Using VariableManager::expandedString(). This is the most comfortable way to get a string
|
||||||
with variable values expanded, but also the least flexible one. If this is sufficient for
|
with variable values expanded, but also the least flexible one. If this is sufficient for
|
||||||
you, use it.
|
you, use it.
|
||||||
\li Using the Utils::expandMacros() methods. These take a string and a macro expander (for which
|
\li Using the Utils::expandMacros() functions. These take a string and a macro expander (for which
|
||||||
you would use the one provided by the variable manager). Mostly the same as
|
you would use the one provided by the variable manager). Mostly the same as
|
||||||
VariableManager::expandedString(), but also has a variant that does the replacement inline
|
VariableManager::expandedString(), but also has a variant that does the replacement inline
|
||||||
instead of returning a new string.
|
instead of returning a new string.
|
||||||
\li Using Utils::QtcProcess::expandMacros(). This expands the string while conforming to the
|
\li Using Utils::QtcProcess::expandMacros(). This expands the string while conforming to the
|
||||||
quoting rules of the platform it is run on. Use this method with the variable manager's
|
quoting rules of the platform it is run on. Use this function with the variable manager's
|
||||||
macro expander if your string will be passed as a command line parameter string to an
|
macro expander if your string will be passed as a command line parameter string to an
|
||||||
external command.
|
external command.
|
||||||
\li Writing your own macro expander that nests the variable manager's macro expander. And then
|
\li Writing your own macro expander that nests the variable manager's macro expander. And then
|
||||||
@@ -208,7 +208,7 @@ VariableManager::~VariableManager()
|
|||||||
* Used to set the \a value of a \a variable. Most of the time this is only done when
|
* Used to set the \a value of a \a variable. Most of the time this is only done when
|
||||||
* requested by VariableManager::variableUpdateRequested(). If the value of the variable
|
* requested by VariableManager::variableUpdateRequested(). If the value of the variable
|
||||||
* does not change, or changes very seldom, you can also keep the value up to date by calling
|
* does not change, or changes very seldom, you can also keep the value up to date by calling
|
||||||
* this method whenever the value changes.
|
* this function whenever the value changes.
|
||||||
*
|
*
|
||||||
* As long as insert() was never called for a variable, it will not have a value, not even
|
* As long as insert() was never called for a variable, it will not have a value, not even
|
||||||
* an empty string, meaning that the variable will not be expanded when expanding strings.
|
* an empty string, meaning that the variable will not be expanded when expanding strings.
|
||||||
@@ -273,8 +273,8 @@ Utils::AbstractMacroExpander *VariableManager::macroExpander()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns the variable manager instance, for connecting to signals. All other methods are static
|
* Returns the variable manager instance, for connecting to signals. All other functions are static
|
||||||
* and should be called as class methods, not through the instance.
|
* and should be called as class functions, not through the instance.
|
||||||
*/
|
*/
|
||||||
QObject *VariableManager::instance()
|
QObject *VariableManager::instance()
|
||||||
{
|
{
|
||||||
@@ -294,7 +294,7 @@ void VariableManager::registerVariable(const QByteArray &variable, const QString
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Convenience method to register several variables with the same \a prefix, that have a file
|
* Convenience function to register several variables with the same \a prefix, that have a file
|
||||||
* as a value. Takes the prefix and registers variables like \c{prefix:FilePath} and
|
* as a value. Takes the prefix and registers variables like \c{prefix:FilePath} and
|
||||||
* \c{prefix:Path}, with descriptions that start with the given \a heading.
|
* \c{prefix:Path}, with descriptions that start with the given \a heading.
|
||||||
* For example \c{registerFileVariables("CurrentDocument", tr("Current Document"))} registers
|
* For example \c{registerFileVariables("CurrentDocument", tr("Current Document"))} registers
|
||||||
|
|||||||
@@ -1023,7 +1023,7 @@ void CPPEditorWidget::jumpToOutlineElement(int index)
|
|||||||
// the view's currentIndex is updated, so we want to use that.
|
// the view's currentIndex is updated, so we want to use that.
|
||||||
// When the scroll wheel was used on the combo box,
|
// When the scroll wheel was used on the combo box,
|
||||||
// the view's currentIndex is not updated,
|
// the view's currentIndex is not updated,
|
||||||
// but the passed index to this method is correct.
|
// but the passed index to this function is correct.
|
||||||
// So, if the view has a current index, we reset it, to be able
|
// So, if the view has a current index, we reset it, to be able
|
||||||
// to distinguish wheel events later
|
// to distinguish wheel events later
|
||||||
if (modelIndex.isValid())
|
if (modelIndex.isValid())
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ void CppEditorPlugin::initializeEditor(CPPEditorWidget *editor)
|
|||||||
editor->setLanguageSettingsId(CppTools::Constants::CPP_SETTINGS_ID);
|
editor->setLanguageSettingsId(CppTools::Constants::CPP_SETTINGS_ID);
|
||||||
TextEditor::TextEditorSettings::initializeEditor(editor);
|
TextEditor::TextEditorSettings::initializeEditor(editor);
|
||||||
|
|
||||||
// method combo box sorting
|
// function combo box sorting
|
||||||
connect(this, SIGNAL(outlineSortingChanged(bool)),
|
connect(this, SIGNAL(outlineSortingChanged(bool)),
|
||||||
editor, SLOT(setSortedOutline(bool)));
|
editor, SLOT(setSortedOutline(bool)));
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
|||||||
contextMenu->addAction(cmd);
|
contextMenu->addAction(cmd);
|
||||||
cppToolsMenu->addAction(cmd);
|
cppToolsMenu->addAction(cmd);
|
||||||
|
|
||||||
QAction *switchDeclarationDefinition = new QAction(tr("Switch Between Method Declaration/Definition"), this);
|
QAction *switchDeclarationDefinition = new QAction(tr("Switch Between Function Declaration/Definition"), this);
|
||||||
cmd = ActionManager::registerAction(switchDeclarationDefinition,
|
cmd = ActionManager::registerAction(switchDeclarationDefinition,
|
||||||
Constants::SWITCH_DECLARATION_DEFINITION, context, true);
|
Constants::SWITCH_DECLARATION_DEFINITION, context, true);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Shift+F2")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Shift+F2")));
|
||||||
@@ -223,7 +223,7 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
|
|||||||
cppToolsMenu->addAction(cmd);
|
cppToolsMenu->addAction(cmd);
|
||||||
|
|
||||||
QAction *openDeclarationDefinitionInNextSplit =
|
QAction *openDeclarationDefinitionInNextSplit =
|
||||||
new QAction(tr("Open Method Declaration/Definition in Next Split"), this);
|
new QAction(tr("Open Function Declaration/Definition in Next Split"), this);
|
||||||
cmd = ActionManager::registerAction(openDeclarationDefinitionInNextSplit,
|
cmd = ActionManager::registerAction(openDeclarationDefinitionInNextSplit,
|
||||||
Constants::OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT, context, true);
|
Constants::OPEN_DECLARATION_DEFINITION_IN_NEXT_SPLIT, context, true);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost()
|
cmd->setDefaultKeySequence(QKeySequence(Utils::HostOsInfo::isMacHost()
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public:
|
|||||||
TextEditor::QuickFixOperations &result);
|
TextEditor::QuickFixOperations &result);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Implement this method to match and create the appropriate
|
Implement this function to match and create the appropriate
|
||||||
CppQuickFixOperation objects.
|
CppQuickFixOperation objects.
|
||||||
*/
|
*/
|
||||||
virtual void match(const CppQuickFixInterface &interface,
|
virtual void match(const CppQuickFixInterface &interface,
|
||||||
|
|||||||
@@ -1302,14 +1302,14 @@ void TranslateStringLiteral::match(const CppQuickFixInterface &interface,
|
|||||||
QSharedPointer<Control> control = interface->context().bindings()->control();
|
QSharedPointer<Control> control = interface->context().bindings()->control();
|
||||||
const Name *trName = control->identifier("tr");
|
const Name *trName = control->identifier("tr");
|
||||||
|
|
||||||
// Check whether we are in a method:
|
// Check whether we are in a function:
|
||||||
const QString description = QApplication::translate("CppTools::QuickFix", "Mark as Translatable");
|
const QString description = QApplication::translate("CppTools::QuickFix", "Mark as Translatable");
|
||||||
for (int i = path.size() - 1; i >= 0; --i) {
|
for (int i = path.size() - 1; i >= 0; --i) {
|
||||||
if (FunctionDefinitionAST *definition = path.at(i)->asFunctionDefinition()) {
|
if (FunctionDefinitionAST *definition = path.at(i)->asFunctionDefinition()) {
|
||||||
Function *function = definition->symbol;
|
Function *function = definition->symbol;
|
||||||
ClassOrNamespace *b = interface->context().lookupType(function);
|
ClassOrNamespace *b = interface->context().lookupType(function);
|
||||||
if (b) {
|
if (b) {
|
||||||
// Do we have a tr method?
|
// Do we have a tr function?
|
||||||
foreach (const LookupItem &r, b->find(trName)) {
|
foreach (const LookupItem &r, b->find(trName)) {
|
||||||
Symbol *s = r.declaration();
|
Symbol *s = r.declaration();
|
||||||
if (s->type()->isFunctionType()) {
|
if (s->type()->isFunctionType()) {
|
||||||
@@ -2180,7 +2180,7 @@ void ReformatPointerDeclaration::match(const CppQuickFixInterface &interface,
|
|||||||
PointerDeclarationFormatter::RespectCursor);
|
PointerDeclarationFormatter::RespectCursor);
|
||||||
|
|
||||||
if (cursor.hasSelection()) {
|
if (cursor.hasSelection()) {
|
||||||
// This will no work always as expected since this method is only called if
|
// This will no work always as expected since this function is only called if
|
||||||
// interface-path() is not empty. If the user selects the whole document via
|
// interface-path() is not empty. If the user selects the whole document via
|
||||||
// ctrl-a and there is an empty line in the end, then the cursor is not on
|
// ctrl-a and there is an empty line in the end, then the cursor is not on
|
||||||
// any AST and therefore no quick fix will be triggered.
|
// any AST and therefore no quick fix will be triggered.
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Tests for Follow Symbol Under Cursor and Switch Between Method Declaration/Definition
|
Tests for Follow Symbol Under Cursor and Switch Between Function Declaration/Definition
|
||||||
|
|
||||||
Section numbers refer to
|
Section numbers refer to
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Encapsulates the whole process of setting up several editors, positioning the cursor,
|
* Encapsulates the whole process of setting up several editors, positioning the cursor,
|
||||||
* executing Follow Symbol Under Cursor or Switch Between Method Declaration/Definition
|
* executing Follow Symbol Under Cursor or Switch Between Function Declaration/Definition
|
||||||
* and checking the result.
|
* and checking the result.
|
||||||
*/
|
*/
|
||||||
class TestCase
|
class TestCase
|
||||||
|
|||||||
@@ -517,10 +517,10 @@ bool CheckSymbols::visit(SimpleDeclarationAST *ast)
|
|||||||
if ((_usages.back().kind != CppHighlightingSupport::VirtualMethodUse)) {
|
if ((_usages.back().kind != CppHighlightingSupport::VirtualMethodUse)) {
|
||||||
if (funTy->isOverride())
|
if (funTy->isOverride())
|
||||||
warning(declrIdNameAST, QCoreApplication::translate(
|
warning(declrIdNameAST, QCoreApplication::translate(
|
||||||
"CPlusplus::CheckSymbols", "Only virtual methods can be marked 'override'"));
|
"CPlusplus::CheckSymbols", "Only virtual functions can be marked 'override'"));
|
||||||
else if (funTy->isFinal())
|
else if (funTy->isFinal())
|
||||||
warning(declrIdNameAST, QCoreApplication::translate(
|
warning(declrIdNameAST, QCoreApplication::translate(
|
||||||
"CPlusPlus::CheckSymbols", "Only virtual methods can be marked 'final'"));
|
"CPlusPlus::CheckSymbols", "Only virtual functions can be marked 'final'"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="categoryTab">
|
<widget class="QTabWidget" name="categoryTab">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>5</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="generalTab">
|
<widget class="QWidget" name="generalTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="indentFunctionBody">
|
<widget class="QCheckBox" name="indentFunctionBody">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Statements within method body</string>
|
<string>Statements within function body</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="indentFunctionBraces">
|
<widget class="QCheckBox" name="indentFunctionBraces">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Method declarations</string>
|
<string>Function declarations</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ QByteArray CppModelManager::internalDefinedMacros() const
|
|||||||
return macros;
|
return macros;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This method will aquire the mutex!
|
/// This function will aquire the mutex!
|
||||||
void CppModelManager::dumpModelManagerConfiguration()
|
void CppModelManager::dumpModelManagerConfiguration()
|
||||||
{
|
{
|
||||||
// Tons of debug output...
|
// Tons of debug output...
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ signals:
|
|||||||
void documentUpdated(CPlusPlus::Document::Ptr doc);
|
void documentUpdated(CPlusPlus::Document::Ptr doc);
|
||||||
void sourceFilesRefreshed(const QStringList &files);
|
void sourceFilesRefreshed(const QStringList &files);
|
||||||
|
|
||||||
/// \brief Emitted after updateProjectInfo method is called on the model-manager.
|
/// \brief Emitted after updateProjectInfo function is called on the model-manager.
|
||||||
///
|
///
|
||||||
/// Other classes can use this to get notified when the \c ProjectExplorer has updated the parts.
|
/// Other classes can use this to get notified when the \c ProjectExplorer has updated the parts.
|
||||||
void projectPartsUpdated(ProjectExplorer::Project *project);
|
void projectPartsUpdated(ProjectExplorer::Project *project);
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ void CppEditorSupport::startHighlighting()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief This slot puts the new diagnostics into the editorUpdates. This method has to be called
|
/// \brief This slot puts the new diagnostics into the editorUpdates. This function has to be called
|
||||||
/// on the UI thread.
|
/// on the UI thread.
|
||||||
void CppEditorSupport::onDiagnosticsChanged()
|
void CppEditorSupport::onDiagnosticsChanged()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ QString SymbolsFindFilter::toolTip(Find::FindFlags findFlags) const
|
|||||||
if (m_symbolsToSearch & SymbolSearcher::Classes)
|
if (m_symbolsToSearch & SymbolSearcher::Classes)
|
||||||
types.append(tr("Classes"));
|
types.append(tr("Classes"));
|
||||||
if (m_symbolsToSearch & SymbolSearcher::Functions)
|
if (m_symbolsToSearch & SymbolSearcher::Functions)
|
||||||
types.append(tr("Methods"));
|
types.append(tr("Functions"));
|
||||||
if (m_symbolsToSearch & SymbolSearcher::Enums)
|
if (m_symbolsToSearch & SymbolSearcher::Enums)
|
||||||
types.append(tr("Enums"));
|
types.append(tr("Enums"));
|
||||||
if (m_symbolsToSearch & SymbolSearcher::Declarations)
|
if (m_symbolsToSearch & SymbolSearcher::Declarations)
|
||||||
@@ -274,7 +274,7 @@ SymbolsFindFilterConfigWidget::SymbolsFindFilterConfigWidget(SymbolsFindFilter *
|
|||||||
m_typeClasses = new QCheckBox(tr("Classes"));
|
m_typeClasses = new QCheckBox(tr("Classes"));
|
||||||
layout->addWidget(m_typeClasses, 0, 1);
|
layout->addWidget(m_typeClasses, 0, 1);
|
||||||
|
|
||||||
m_typeMethods = new QCheckBox(tr("Methods"));
|
m_typeMethods = new QCheckBox(tr("Functions"));
|
||||||
layout->addWidget(m_typeMethods, 0, 2);
|
layout->addWidget(m_typeMethods, 0, 2);
|
||||||
|
|
||||||
m_typeEnums = new QCheckBox(tr("Enums"));
|
m_typeEnums = new QCheckBox(tr("Enums"));
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ DebuggerSourcePathMappingWidget::SourcePathMap
|
|||||||
// We could query the QtVersion for this information directly, but then we
|
// We could query the QtVersion for this information directly, but then we
|
||||||
// will need to add a dependency on QtSupport to the debugger.
|
// will need to add a dependency on QtSupport to the debugger.
|
||||||
//
|
//
|
||||||
// The profile could also get a method to extract the required information from
|
// The profile could also get a function to extract the required information from
|
||||||
// its information to avoid this dependency (as we do for the environment).
|
// its information to avoid this dependency (as we do for the environment).
|
||||||
const QString qtInstallPath = findQtInstallPath(qmake);
|
const QString qtInstallPath = findQtInstallPath(qmake);
|
||||||
SourcePathMap rc = in;
|
SourcePathMap rc = in;
|
||||||
|
|||||||
@@ -2418,7 +2418,7 @@ void GdbEngine::handleExecuteReturn(const GdbResponse &response)
|
|||||||
/*!
|
/*!
|
||||||
Discards the results of all pending watch-updating commands.
|
Discards the results of all pending watch-updating commands.
|
||||||
|
|
||||||
This method is called at the beginning of all step, next, finish, and so on,
|
This function is called at the beginning of all step, next, finish, and so on,
|
||||||
debugger functions.
|
debugger functions.
|
||||||
If non-watch-updating commands with call-backs are still in the pipe,
|
If non-watch-updating commands with call-backs are still in the pipe,
|
||||||
it will complain.
|
it will complain.
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ void FormEditorPlugin::extensionsInitialized()
|
|||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// PRIVATE methods
|
// PRIVATE functions
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class SettingsPage;
|
|||||||
class DesignerContext;
|
class DesignerContext;
|
||||||
|
|
||||||
/** FormEditorW is a singleton that stores the Designer CoreInterface and
|
/** FormEditorW is a singleton that stores the Designer CoreInterface and
|
||||||
* performs centralized operations. The instance() method will return an
|
* performs centralized operations. The instance() function will return an
|
||||||
* instance. However, it must be manually deleted when unloading the
|
* instance. However, it must be manually deleted when unloading the
|
||||||
* plugin. Since fully initializing Designer at startup is expensive, the
|
* plugin. Since fully initializing Designer at startup is expensive, the
|
||||||
* class has an internal partial initialisation stage "RegisterPlugins"
|
* class has an internal partial initialisation stage "RegisterPlugins"
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace qdesigner_internal {
|
|||||||
class PreviewManager;
|
class PreviewManager;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Convenience methods to manage form previews (ultimately forwarded to PreviewManager).
|
// Convenience functions to manage form previews (ultimately forwarded to PreviewManager).
|
||||||
//
|
//
|
||||||
class QDESIGNER_SHARED_EXPORT QDesignerFormWindowManager
|
class QDESIGNER_SHARED_EXPORT QDesignerFormWindowManager
|
||||||
: public QDesignerFormWindowManagerInterface
|
: public QDesignerFormWindowManagerInterface
|
||||||
|
|||||||
@@ -228,8 +228,8 @@ static Function *findDeclaration(const Class *cl, const QString &functionName)
|
|||||||
{
|
{
|
||||||
const QString funName = QString::fromUtf8(QMetaObject::normalizedSignature(functionName.toUtf8()));
|
const QString funName = QString::fromUtf8(QMetaObject::normalizedSignature(functionName.toUtf8()));
|
||||||
const unsigned mCount = cl->memberCount();
|
const unsigned mCount = cl->memberCount();
|
||||||
// we are interested only in declarations (can be decl of method or of a field)
|
// we are interested only in declarations (can be decl of function or of a field)
|
||||||
// we are only interested in declarations of methods
|
// we are only interested in declarations of functions
|
||||||
const Overview overview;
|
const Overview overview;
|
||||||
for (unsigned j = 0; j < mCount; ++j) { // go through all members
|
for (unsigned j = 0; j < mCount; ++j) { // go through all members
|
||||||
if (Declaration *decl = cl->memberAt(j)->asDeclaration())
|
if (Declaration *decl = cl->memberAt(j)->asDeclaration())
|
||||||
@@ -254,7 +254,7 @@ static Function *findDeclaration(const Class *cl, const QString &functionName)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove me, this is taken from cppeditor.cpp. Find some common place for this method
|
// TODO: remove me, this is taken from cppeditor.cpp. Find some common place for this function
|
||||||
static Document::Ptr findDefinition(Function *functionDeclaration, int *line)
|
static Document::Ptr findDefinition(Function *functionDeclaration, int *line)
|
||||||
{
|
{
|
||||||
if (CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance()) {
|
if (CppTools::CppModelManagerInterface *cppModelManager = CppTools::CppModelManagerInterface::instance()) {
|
||||||
|
|||||||
@@ -74,20 +74,20 @@
|
|||||||
|
|
||||||
The common pattern is roughly this:
|
The common pattern is roughly this:
|
||||||
|
|
||||||
Implement the actual search within a QtConcurrent based method, that is
|
Implement the actual search within a QtConcurrent based function, that is
|
||||||
a method that takes a \c{QFutureInterface<MySearchResult> &future}
|
a function that takes a \c{QFutureInterface<MySearchResult> &future}
|
||||||
as the first parameter and the other information needed for the search
|
as the first parameter and the other information needed for the search
|
||||||
as additional parameters. It should set useful progress information
|
as additional parameters. It should set useful progress information
|
||||||
on the QFutureInterface, regularly check for \c{future.isPaused()}
|
on the QFutureInterface, regularly check for \c{future.isPaused()}
|
||||||
and \c{future.isCanceled()}, and report the search results
|
and \c{future.isCanceled()}, and report the search results
|
||||||
(possibly in chunks) via \c{future.reportResult}.
|
(possibly in chunks) via \c{future.reportResult}.
|
||||||
|
|
||||||
In the find filter's find/replaceAll method, get the shared
|
In the find filter's find/replaceAll function, get the shared
|
||||||
\gui{Search Results} window, initiate a new search and connect the
|
\gui{Search Results} window, initiate a new search and connect the
|
||||||
signals for handling selection of results and the replace action
|
signals for handling selection of results and the replace action
|
||||||
(see the Find::SearchResultWindow class for details).
|
(see the Find::SearchResultWindow class for details).
|
||||||
Start your search implementation via the corresponding QtConcurrent
|
Start your search implementation via the corresponding QtConcurrent
|
||||||
methods. Add the returned QFuture object to the Core::ProgressManager.
|
functions. Add the returned QFuture object to the Core::ProgressManager.
|
||||||
Use a QFutureWatcher on the returned QFuture object to receive a signal
|
Use a QFutureWatcher on the returned QFuture object to receive a signal
|
||||||
when your search implementation reports search results, and add these
|
when your search implementation reports search results, and add these
|
||||||
to the shared \gui{Search Results} window.
|
to the shared \gui{Search Results} window.
|
||||||
@@ -138,13 +138,13 @@
|
|||||||
\fn bool IFindFilter::isReplaceSupported() const
|
\fn bool IFindFilter::isReplaceSupported() const
|
||||||
Returns whether the find filter supports search and replace.
|
Returns whether the find filter supports search and replace.
|
||||||
|
|
||||||
The default value is false, override this method to return \c true, if
|
The default value is false, override this function to return \c true, if
|
||||||
your find filter supports global search and replace.
|
your find filter supports global search and replace.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void IFindFilter::findAll(const QString &txt, Find::FindFlags findFlags)
|
\fn void IFindFilter::findAll(const QString &txt, Find::FindFlags findFlags)
|
||||||
This method is called when the user selected this find scope and
|
This function is called when the user selected this find scope and
|
||||||
initiated a search.
|
initiated a search.
|
||||||
|
|
||||||
You should start a thread which actually performs the search for \a txt
|
You should start a thread which actually performs the search for \a txt
|
||||||
@@ -161,9 +161,9 @@
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void IFindFilter::replaceAll(const QString &txt, Find::FindFlags findFlags)
|
\fn void IFindFilter::replaceAll(const QString &txt, Find::FindFlags findFlags)
|
||||||
Override this method if you want to support search and replace.
|
Override this function if you want to support search and replace.
|
||||||
|
|
||||||
This method is called when the user selected this find scope and
|
This function is called when the user selected this find scope and
|
||||||
initiated a search and replace.
|
initiated a search and replace.
|
||||||
The default implementation does nothing.
|
The default implementation does nothing.
|
||||||
|
|
||||||
|
|||||||
@@ -238,14 +238,14 @@ using namespace Find::Internal;
|
|||||||
of this class.
|
of this class.
|
||||||
|
|
||||||
Except for being an implementation of a output pane, the
|
Except for being an implementation of a output pane, the
|
||||||
SearchResultWindow has a few methods and one enum that allows other
|
SearchResultWindow has a few functions and one enum that allows other
|
||||||
plugins to show their search results and hook into the user actions for
|
plugins to show their search results and hook into the user actions for
|
||||||
selecting an entry and performing a global replace.
|
selecting an entry and performing a global replace.
|
||||||
|
|
||||||
Whenever you start a search, call startNewSearch(SearchMode) to initialize
|
Whenever you start a search, call startNewSearch(SearchMode) to initialize
|
||||||
the \gui {Search Results} output pane. The parameter determines if the GUI for
|
the \gui {Search Results} output pane. The parameter determines if the GUI for
|
||||||
replacing should be shown.
|
replacing should be shown.
|
||||||
The method returns a SearchResult object that is your
|
The function returns a SearchResult object that is your
|
||||||
hook into the signals from user interaction for this search.
|
hook into the signals from user interaction for this search.
|
||||||
When you produce search results, call addResults or addResult to add them
|
When you produce search results, call addResults or addResult to add them
|
||||||
to the \gui {Search Results} output pane.
|
to the \gui {Search Results} output pane.
|
||||||
|
|||||||
@@ -1352,7 +1352,7 @@ void GitPlugin::stashSnapshot()
|
|||||||
m_stashDialog->refresh(state.topLevel(), true);
|
m_stashDialog->refresh(state.topLevel(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a non-modal dialog with refresh method or raise if it exists
|
// Create a non-modal dialog with refresh function or raise if it exists
|
||||||
template <class NonModalDialog>
|
template <class NonModalDialog>
|
||||||
inline void showNonModalDialog(const QString &topLevel,
|
inline void showNonModalDialog(const QString &topLevel,
|
||||||
QPointer<NonModalDialog> &dialog)
|
QPointer<NonModalDialog> &dialog)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
/*! Constructs the Hello World plugin. Normally plugins don't do anything in
|
/*! Constructs the Hello World plugin. Normally plugins don't do anything in
|
||||||
their constructor except for initializing their member variables. The
|
their constructor except for initializing their member variables. The
|
||||||
actual work is done later, in the initialize() and extensionsInitialized()
|
actual work is done later, in the initialize() and extensionsInitialized()
|
||||||
methods.
|
functions.
|
||||||
*/
|
*/
|
||||||
HelloWorldPlugin::HelloWorldPlugin()
|
HelloWorldPlugin::HelloWorldPlugin()
|
||||||
{
|
{
|
||||||
@@ -131,7 +131,7 @@ bool HelloWorldPlugin::initialize(const QStringList &arguments, QString *errorMe
|
|||||||
/*! Notification that all extensions that this plugin depends on have been
|
/*! Notification that all extensions that this plugin depends on have been
|
||||||
initialized. The dependencies are defined in the plugins .pluginspec file.
|
initialized. The dependencies are defined in the plugins .pluginspec file.
|
||||||
|
|
||||||
Normally this method is used for things that rely on other plugins to have
|
Normally this function is used for things that rely on other plugins to have
|
||||||
added objects to the plugin manager, that implement interfaces that we're
|
added objects to the plugin manager, that implement interfaces that we're
|
||||||
interested in. These objects can now be requested through the
|
interested in. These objects can now be requested through the
|
||||||
PluginManagerInterface.
|
PluginManagerInterface.
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ using namespace Macros::Internal;
|
|||||||
|
|
||||||
When replaying a macro, the manager iterates through all macro events
|
When replaying a macro, the manager iterates through all macro events
|
||||||
specified in \a macroEvent
|
specified in \a macroEvent
|
||||||
in the macro and calls this method to determine which handler to use.
|
in the macro and calls this function to determine which handler to use.
|
||||||
If the method returns \c true, \c executeEvent is called.
|
If the function returns \c true, \c executeEvent is called.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -77,13 +77,13 @@ using namespace Macros::Internal;
|
|||||||
The MacroManager manages all macros, loads them on startup, keeps track of the
|
The MacroManager manages all macros, loads them on startup, keeps track of the
|
||||||
current macro, and creates new macros.
|
current macro, and creates new macros.
|
||||||
|
|
||||||
There are two important methods in this class that can be used outside the Macros plugin:
|
There are two important functions in this class that can be used outside the Macros plugin:
|
||||||
\list
|
\list
|
||||||
\li registerEventHandler: add a new event handler
|
\li registerEventHandler: add a new event handler
|
||||||
\li registerAction: add a macro event when this action is triggered
|
\li registerAction: add a macro event when this action is triggered
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
This class is a singleton and can be accessed using the instance method.
|
This class is a singleton and can be accessed using the instance function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ using namespace ProjectExplorer;
|
|||||||
|
|
||||||
Enables or disables a BuildStep.
|
Enables or disables a BuildStep.
|
||||||
|
|
||||||
Disabled BuildSteps immediately return true from their run method.
|
Disabled BuildSteps immediately return true from their run function.
|
||||||
Should be called from init().
|
Should be called from init().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -102,14 +102,14 @@
|
|||||||
/*!
|
/*!
|
||||||
\fn void ProjectExplorer::IOutputParser::outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format)
|
\fn void ProjectExplorer::IOutputParser::outputAdded(const QString &string, ProjectExplorer::BuildStep::OutputFormat format)
|
||||||
|
|
||||||
This method can be overwritten to change the string.
|
This function can be overwritten to change the string.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void ProjectExplorer::IOutputParser::taskAdded(const ProjectExplorer::Task &task)
|
\fn void ProjectExplorer::IOutputParser::taskAdded(const ProjectExplorer::Task &task)
|
||||||
|
|
||||||
Subparsers have their addTask signal connected to this slot.
|
Subparsers have their addTask signal connected to this slot.
|
||||||
This method can be overwritten to change the task.
|
This function can be overwritten to change the task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
Instructs a parser to flush its state.
|
Instructs a parser to flush its state.
|
||||||
Parsers may have state (for example, because they need to aggregate several
|
Parsers may have state (for example, because they need to aggregate several
|
||||||
lines into one task). This
|
lines into one task). This
|
||||||
method is called when this state needs to be flushed out to be visible.
|
function is called when this state needs to be flushed out to be visible.
|
||||||
|
|
||||||
doFlush() is called by flush(). flush() is called on child parsers
|
doFlush() is called by flush(). flush() is called on child parsers
|
||||||
whenever a new task is added.
|
whenever a new task is added.
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ using namespace ProjectExplorer;
|
|||||||
\brief Base class for visitors that can be used to traverse a node hierarchy.
|
\brief Base class for visitors that can be used to traverse a node hierarchy.
|
||||||
|
|
||||||
The class follows the visitor pattern as described in Gamma et al. Pass
|
The class follows the visitor pattern as described in Gamma et al. Pass
|
||||||
an instance of NodesVisitor to FolderNode::accept(): The visit methods
|
an instance of NodesVisitor to FolderNode::accept(): The visit functions
|
||||||
will be called for each node in the subtree, except for file nodes:
|
will be called for each node in the subtree, except for file nodes:
|
||||||
Access these through FolderNode::fileNodes() in visitProjectNode()
|
Access these through FolderNode::fileNodes() in visitProjectNode()
|
||||||
and visitoFolderNode().
|
and visitoFolderNode().
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ OutputParserTester::OutputParserTester() :
|
|||||||
m_debug(false)
|
m_debug(false)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// test methods:
|
// test functions:
|
||||||
void OutputParserTester::testParsing(const QString &lines,
|
void OutputParserTester::testParsing(const QString &lines,
|
||||||
Channel inputChannel,
|
Channel inputChannel,
|
||||||
QList<Task> tasks,
|
QList<Task> tasks,
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public:
|
|||||||
|
|
||||||
OutputParserTester();
|
OutputParserTester();
|
||||||
|
|
||||||
// test methods:
|
// test functions:
|
||||||
void testParsing(const QString &lines, Channel inputChannel,
|
void testParsing(const QString &lines, Channel inputChannel,
|
||||||
QList<Task> tasks,
|
QList<Task> tasks,
|
||||||
const QString &childStdOutLines,
|
const QString &childStdOutLines,
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ bool Project::restoreSettings()
|
|||||||
This map is then saved in the .user file of the project.
|
This map is then saved in the .user file of the project.
|
||||||
Just put all your data into the map.
|
Just put all your data into the map.
|
||||||
|
|
||||||
\note Do not forget to call your base class' toMap method.
|
\note Do not forget to call your base class' toMap function.
|
||||||
\note Do not forget to call setActiveBuildConfiguration when
|
\note Do not forget to call setActiveBuildConfiguration when
|
||||||
creating new build configurations.
|
creating new build configurations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -57,10 +57,10 @@ public:
|
|||||||
void setDisplayName(const QString &name);
|
void setDisplayName(const QString &name);
|
||||||
void setDefaultDisplayName(const QString &name);
|
void setDefaultDisplayName(const QString &name);
|
||||||
|
|
||||||
// Note: Make sure subclasses call the superclasses' fromMap() method!
|
// Note: Make sure subclasses call the superclasses' fromMap() function!
|
||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
|
||||||
// Note: Make sure subclasses call the superclasses' toMap() method!
|
// Note: Make sure subclasses call the superclasses' toMap() function!
|
||||||
virtual QVariantMap toMap() const;
|
virtual QVariantMap toMap() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -1519,7 +1519,7 @@ static inline QStringList projectFileGlobs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
This method is connected to the ICore::coreOpened signal. If
|
This function is connected to the ICore::coreOpened signal. If
|
||||||
there was no session explicitly loaded, it creates an empty new
|
there was no session explicitly loaded, it creates an empty new
|
||||||
default session and puts the list of recent projects and sessions
|
default session and puts the list of recent projects and sessions
|
||||||
onto the welcome page.
|
onto the welcome page.
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void Node::emitNodeSortKeyChanged()
|
|||||||
/*!
|
/*!
|
||||||
* The path of the file representing this node.
|
* The path of the file representing this node.
|
||||||
*
|
*
|
||||||
* This method does not emit any signals. That has to be done by the calling
|
* This function does not emit any signals. That has to be done by the calling
|
||||||
* class.
|
* class.
|
||||||
*/
|
*/
|
||||||
void Node::setPath(const QString &path)
|
void Node::setPath(const QString &path)
|
||||||
@@ -613,7 +613,7 @@ void ProjectNode::removeFolderNodes(const QList<FolderNode*> &subFolders,
|
|||||||
Adds file nodes specified by \a files to the internal list in the location
|
Adds file nodes specified by \a files to the internal list in the location
|
||||||
specified by \a folder and emits the corresponding signals.
|
specified by \a folder and emits the corresponding signals.
|
||||||
|
|
||||||
This method should be called within an implementation of the public method
|
This function should be called within an implementation of the public function
|
||||||
addFiles.
|
addFiles.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -658,7 +658,7 @@ void ProjectNode::addFileNodes(const QList<FileNode*> &files, FolderNode *folder
|
|||||||
Removes \a files from the internal list and emits the corresponding signals.
|
Removes \a files from the internal list and emits the corresponding signals.
|
||||||
|
|
||||||
All objects in the \a files list are deleted.
|
All objects in the \a files list are deleted.
|
||||||
This method should be called within an implementation of the public method
|
This function should be called within an implementation of the public function
|
||||||
removeFiles.
|
removeFiles.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ public:
|
|||||||
void removeFileNodes(const QList<FileNode*> &files, FolderNode *parentFolder);
|
void removeFileNodes(const QList<FileNode*> &files, FolderNode *parentFolder);
|
||||||
|
|
||||||
// to be called in implementation of
|
// to be called in implementation of
|
||||||
// the corresponding public methods
|
// the corresponding public functions
|
||||||
void addProjectNodes(const QList<ProjectNode*> &subProjects);
|
void addProjectNodes(const QList<ProjectNode*> &subProjects);
|
||||||
void removeProjectNodes(const QList<ProjectNode*> &subProjects);
|
void removeProjectNodes(const QList<ProjectNode*> &subProjects);
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ protected:
|
|||||||
RunConfiguration(Target *parent, const Core::Id id);
|
RunConfiguration(Target *parent, const Core::Id id);
|
||||||
RunConfiguration(Target *parent, RunConfiguration *source);
|
RunConfiguration(Target *parent, RunConfiguration *source);
|
||||||
|
|
||||||
/// convenience method to get current build configuration.
|
/// convenience function to get current build configuration.
|
||||||
BuildConfiguration *activeBuildConfiguration() const;
|
BuildConfiguration *activeBuildConfiguration() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ bool ToolChain::operator == (const ToolChain &tc) const
|
|||||||
/*!
|
/*!
|
||||||
Used by the tool chain manager to save user-generated tool chains.
|
Used by the tool chain manager to save user-generated tool chains.
|
||||||
|
|
||||||
Make sure to call this method when deriving.
|
Make sure to call this function when deriving.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QVariantMap ToolChain::toMap() const
|
QVariantMap ToolChain::toMap() const
|
||||||
@@ -185,7 +185,7 @@ void ToolChain::setDetection(ToolChain::Detection de)
|
|||||||
/*!
|
/*!
|
||||||
Used by the tool chain manager to load user-generated tool chains.
|
Used by the tool chain manager to load user-generated tool chains.
|
||||||
|
|
||||||
Make sure to call this method when deriving.
|
Make sure to call this function when deriving.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool ToolChain::fromMap(const QVariantMap &data)
|
bool ToolChain::fromMap(const QVariantMap &data)
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public:
|
|||||||
virtual ToolChain *clone() const = 0;
|
virtual ToolChain *clone() const = 0;
|
||||||
|
|
||||||
// Used by the toolchainmanager to save user-generated tool chains.
|
// Used by the toolchainmanager to save user-generated tool chains.
|
||||||
// Make sure to call this method when deriving!
|
// Make sure to call this function when deriving!
|
||||||
virtual QVariantMap toMap() const;
|
virtual QVariantMap toMap() const;
|
||||||
virtual QList<Task> validateKit(const Kit *k) const;
|
virtual QList<Task> validateKit(const Kit *k) const;
|
||||||
protected:
|
protected:
|
||||||
@@ -159,7 +159,7 @@ protected:
|
|||||||
|
|
||||||
void toolChainUpdated();
|
void toolChainUpdated();
|
||||||
|
|
||||||
// Make sure to call this method when deriving!
|
// Make sure to call this function when deriving!
|
||||||
virtual bool fromMap(const QVariantMap &data);
|
virtual bool fromMap(const QVariantMap &data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ PythonHighlighter::~PythonHighlighter()
|
|||||||
/**
|
/**
|
||||||
* @brief Highlighter::highlightBlock highlights single line of Python code
|
* @brief Highlighter::highlightBlock highlights single line of Python code
|
||||||
* @param text is single line without EOLN symbol. Access to all block data
|
* @param text is single line without EOLN symbol. Access to all block data
|
||||||
* can be obtained through inherited currentBlock() method.
|
* can be obtained through inherited currentBlock() function.
|
||||||
*
|
*
|
||||||
* This method receives state (int number) from previously highlighted block,
|
* This function receives state (int number) from previously highlighted block,
|
||||||
* scans block using received state and sets initial highlighting for current
|
* scans block using received state and sets initial highlighting for current
|
||||||
* block. At the end, it saves internal state in current block.
|
* block. At the end, it saves internal state in current block.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ bool PythonIndenter::isElectricCharacter(const QChar &ch) const
|
|||||||
* @param typedChar Unused
|
* @param typedChar Unused
|
||||||
* @param tabSettings An IDE tabulation settings
|
* @param tabSettings An IDE tabulation settings
|
||||||
*
|
*
|
||||||
* Usually this method called once when you begin new line of code by pressing
|
* Usually this function called once when you begin new line of code by pressing
|
||||||
* Enter. If Indenter reimplements indent() method, than indentBlock() may be
|
* Enter. If Indenter reimplements indent() function, than indentBlock() may be
|
||||||
* called in other cases.
|
* called in other cases.
|
||||||
*/
|
*/
|
||||||
void PythonIndenter::indentBlock(QTextDocument *document,
|
void PythonIndenter::indentBlock(QTextDocument *document,
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void triggered(bool checked, const SelectionContext &selectionContext);
|
void triggered(bool checked, const SelectionContext &selectionContext);
|
||||||
|
|
||||||
public slots: //virtual method instead of slot
|
public slots: //virtual function instead of slot
|
||||||
virtual void actionTriggered(bool enable);
|
virtual void actionTriggered(bool enable);
|
||||||
void setSelectionContext(const SelectionContext &selectionContext);
|
void setSelectionContext(const SelectionContext &selectionContext);
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ AbstractFormEditorTool* FormEditorScene::currentTool() const
|
|||||||
return m_editorView->currentTool();
|
return m_editorView->currentTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
//This method calculates the possible parent for reparent
|
//This function calculates the possible parent for reparent
|
||||||
FormEditorItem* FormEditorScene::calulateNewParent(FormEditorItem *formEditorItem)
|
FormEditorItem* FormEditorScene::calulateNewParent(FormEditorItem *formEditorItem)
|
||||||
{
|
{
|
||||||
if (formEditorItem->qmlItemNode().isValid()) {
|
if (formEditorItem->qmlItemNode().isValid()) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user