Merge remote-tracking branch 'origin/3.0'

This commit is contained in:
Eike Ziller
2013-10-14 15:31:54 +02:00
276 changed files with 2451 additions and 2043 deletions

View File

@@ -357,7 +357,7 @@
\image addressbook-tutorial-part2-signals-and-slots.png
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.
\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
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
\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.
Then proceed to extract the search string, which in this case is

View File

@@ -86,10 +86,10 @@
backward source code compatibility in patch releases, so:
\list
\li Do not add or remove any public API (e.g. global functions,x
public/protected/private methods).
\li Do not reimplement methods (not even inlines,
nor protected or private methods).
\li Do not add or remove any public API (e.g. global functions,
public/protected/private member functions).
\li Do not reimplement functions (not even inlines,
nor protected or private functions).
\li Check
\l {http://wiki.qt-project.org/index.php/Binary_Compatibility_Workarounds}{Binary Compatibility Workarounds}
for ways to preserve binary compatibility.
@@ -687,7 +687,7 @@
will not remove the const modifier.
\li Do not use \c dynamic_cast, use \c {qobject_cast} for QObjects, or
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
\section2 Compiler and Platform-specific Issues
@@ -854,7 +854,7 @@
binary 0, instead of comparing it to 0.0, or, preferred, move
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
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

View File

@@ -34,7 +34,7 @@ bool ExamplePlugin::initialize(const QStringList &arguments, QString *errorStrin
// Load settings
// Add actions to menus
// 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.
Q_UNUSED(arguments)
@@ -62,7 +62,7 @@ bool ExamplePlugin::initialize(const QStringList &arguments, QString *errorStrin
void ExamplePlugin::extensionsInitialized()
{
// 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.
}

View File

@@ -20,11 +20,11 @@ public:
ExamplePlugin();
~ExamplePlugin();
//! [plugin methods]
//! [plugin functions]
bool initialize(const QStringList &arguments, QString *errorString);
void extensionsInitialized();
ShutdownFlag aboutToShutdown();
//! [plugin methods]
//! [plugin functions]
//! [slot]
private slots:

View File

@@ -276,11 +276,11 @@
All \QC plugins must be derived from \l{ExtensionSystem::IPlugin} and
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.
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}.
\snippet exampleplugin/exampleplugin.h slot
@@ -296,8 +296,8 @@
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.
The setup of the menu and menu item
is done in the plugin's \c{initialize} method, which is the first thing called
after the plugin constructor. In that method, the plugin can be sure that the basic
is done in the plugin's \c{initialize} function, which is the first thing called
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
\c{ActionManager} instance has been created.

View File

@@ -37,8 +37,8 @@
tracks the state of the plugin.
You can get the \l{ExtensionSystem::PluginSpec} instances via the
plugin manager's \l{ExtensionSystem::PluginManager::plugins()}{plugins()}
method, or, after a plugin is loaded, through the plugin's
\l{ExtensionSystem::IPlugin::pluginSpec()}{pluginSpec()} method.
function, or, after a plugin is loaded, through the plugin's
\l{ExtensionSystem::IPlugin::pluginSpec()}{pluginSpec()} function.
\li Sets the plugins to \c Read state.
@@ -61,15 +61,15 @@
\li Sets the plugins to \c Loaded state.
\li Calls the \l{ExtensionSystem::IPlugin::initialize()}{initialize()} methods of
all plugins in the order of the load queue. In the \c initialize method,
\li Calls the \l{ExtensionSystem::IPlugin::initialize()}{initialize()} functions of
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
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
\l{Core::ActionManager}, \l{Core::EditorManager} and all other publicly available
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
\list
\li registering objects in the plugin manager's object pool
@@ -82,8 +82,8 @@
\li Sets the plugins to \c Initialized state.
\li Calls the \l{ExtensionSystem::IPlugin::extensionsInitialized()}{extensionsInitialized()}
methods of all plugins in \e reverse order of the load queue. After
the \c extensionsInitialized method, a plugin should be fully initialized, set up
functions of all plugins in \e reverse order of the load queue. After
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 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
@@ -97,10 +97,10 @@
and afterwards \l{Core::ICore::coreOpened()}{coreOpened()}.
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
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.
After all delayed initializations are done the \l{ExtensionSystem::PluginManager}{PluginManager}
@@ -111,14 +111,14 @@
plugin manager starts its shutdown sequence:
\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
for speeding up the actual shutdown here, like disconnecting signals that
would otherwise needlessly be called.
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,
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
the asynchronousShutdownFinished() signal.

View File

@@ -199,7 +199,7 @@
\l{The Plugin Manager, the Object Pool, and Registered Objects}{global object pool}
via ExtensionSystem::PluginManager::getObjectByName() or
ExtensionSystem::PluginManager::getObjectByClassName(), and use QMetaObject functions to call
methods on it.
functions on it.
\section2 Command Line Arguments
@@ -210,7 +210,7 @@
line parsing and sanity checks based on that information.
If the plugin manager finds matching command line arguments for a plugin,
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
tag. The individual command line arguments are defined by the \c argument tag,

View File

@@ -38,13 +38,13 @@
and retrieved depending on different criteria.
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.
See the ExtensionSystem::PluginManager reference documentation for the complete list.
\table
\header
\li Method
\li Function
\li Description
\row
\li instance()
@@ -97,9 +97,9 @@
All objects of a specified type can be retrieved from the object pool
via the \l{ExtensionSystem::PluginManager::getObjects()}{getObjects()} and
\l{ExtensionSystem::PluginManager::getObject()}{getObject()} methods.
They are aware of Aggregation::Aggregate, so these methods use the Aggregation::query() methods
instead of qobject_cast to determine the matching objects.
\l{ExtensionSystem::PluginManager::getObject()}{getObject()} functions.
They are aware of Aggregation::Aggregate, so these functions use the Aggregation::query()
functions instead of qobject_cast to determine the matching objects.
It is also possible to retrieve an object with a specific object name with
\l{ExtensionSystem::PluginManager::getObjectByName()}{getObjectByName()}

View File

@@ -240,7 +240,7 @@
The complete code of \c webpagewizard.cpp looks as follows:
\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:
\snippet webpagewizard/webpagewizardplugin.cpp 0
*/

View File

@@ -1011,7 +1011,7 @@
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
\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.
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
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.
\li \gui{putField(self, name, value)} - Appends a name='value' field.

View File

@@ -151,13 +151,13 @@
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
declaration. This feature is supported for namespaces, classes, methods,
declaration. This feature is supported for namespaces, classes, functions,
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
{Switch Between Method Declaration/Definition}. For example, this allows
you to navigate from anywhere within a method body directly to the method
{Switch Between Function Declaration/Definition}. For example, this allows
you to navigate from anywhere within a function body directly to the function
declaration.
Links are opened in the same split by default. To open links in the next

View File

@@ -45,7 +45,7 @@
Use the incremental and advanced search to search from currently
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.
\li \l{Refactoring}

View File

@@ -43,7 +43,7 @@
\li Class fields
\li Virtual methods
\li Virtual functions
\endlist
@@ -1062,9 +1062,9 @@
\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.
@@ -1178,14 +1178,14 @@
You can indent public, protected, and private statements and declarations
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.
\image qtcreator-code-style-content.png "Content options"
\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.
\image qtcreator-code-style-braces.png "Braces options"
@@ -1422,7 +1422,7 @@
\endlist
\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
are used by the code, such as include files.
@@ -1523,7 +1523,7 @@
\li Create variable declarations
\li Create method declarations and definitions
\li Create function declarations and definitions
\endlist
@@ -1817,21 +1817,21 @@
}
\endcode
\li Method name
\li Function name
\row
\li Add 'Function' Declaration
\li Inserts the member function declaration that matches the member function
definition into the class declaration. The function can be public,
protected, private, public slot, protected slot, or private slot.
\li Method name
\li Function name
\row
\li Switch with Next/Previous Parameter
\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
\li Extract Method
\li Moves the selected code to a new method and replaces the block of
code with a call to the new method. Enter a name for the method in
\li Extract Function
\li Moves the selected code to a new function and replaces the block of
code with a call to the new function. Enter a name for the function in
the \gui {Extract Function Refactoring} dialog.
\li Block of code selected
\row
@@ -1875,8 +1875,8 @@
\li Generate Missing Q_PROPERTY Members
\li Adds missing members to a Q_PROPERTY:
\list
\li \c read method
\li \c write method, if there is a WRITE
\li \c read function
\li \c write function, if there is a WRITE
\li \c {onChanged} signal, if there is a NOTIFY
\li data member with the name \c {m_<propertyName>}
\endlist
@@ -2187,7 +2187,7 @@
\endlist
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}.
By default, the following filters are enabled and you do not need to use

View File

@@ -45,7 +45,7 @@
\li \l{Searching with the Locator}
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.
\endlist

View File

@@ -391,14 +391,14 @@
\row
\li Follow symbol under cursor
Works with namespaces, classes, methods, variables, include
Works with namespaces, classes, functions, variables, include
statements and macros
\li F2
\row
\li Rename symbol under cursor
\li Ctrl+Shift+R
\row
\li Switch between method declaration and definition
\li Switch between function declaration and definition
\li Shift+F2
\row
\li Open type hierarchy

View File

@@ -212,7 +212,7 @@
\section1 Locating Files
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
create your own locator filters. That way you can locate files in a
directory structure you have defined.

View File

@@ -56,7 +56,7 @@
output panes (7).
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

View File

@@ -281,17 +281,17 @@
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
use case: \e {Fix AMethod in SomeClass which comes from
use case: \e {Fix AFunction in SomeClass which comes from
someclass.cpp/someclass.h}.
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
method is not located in that file. They would then search for someclass.h
the tab bar, and then search for \c {::AFunction}, only to find out that the
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
forget where they came from.
With \QC, developers can type \c {Ctrl+K m AMet} to find the method.
Typically, they only need to type 3 to 4 characters of the method name.
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 function name.
They can then fix the problem and press \key Alt+Back to go back to where
they were.

View File

@@ -41,8 +41,7 @@
\li \inlineimage creator_managingprojects.png
\li \inlineimage creator_designinguserinterface.png
\row
\li \list
\li \b {\l{Getting Started}}
\li \b {\l{Getting Started}}
\list
\li \l{IDE Overview}
\li \l{User Interface}
@@ -50,68 +49,54 @@
\li \l{Building and Running an Example}
\li \l{Tutorials}
\endlist
\endlist
\li \list
\li \b {\l{Managing Projects}}
\li \b {\l{Managing Projects}}
\list
\li \l{Creating Projects}
\li \l{Using Version Control Systems}
\li \l{Configuring Projects}
\li \l{Managing Sessions}
\endlist
\endlist
\li \list
\li \b {\l{Designing User Interfaces}}
\list
\li \l{Developing Qt Quick Applications}
\li \l{Developing Widget Based Applications}
\li \l{Optimizing Applications for Mobile Devices}
\endlist
\endlist
\row
\li \inlineimage creator_coding.png
\li \inlineimage creator_buildingrunning.png
\li \inlineimage creator_testing.png
\row
\li \list
\li \b {\l{Coding}}
\list
\li \l{Writing Code}
\li \l{Finding}
\li \l{Refactoring}
\li \l{Configuring the Editor}
\endlist
\endlist
\li \list
\li \b {\l{Building and Running}}
\list
\li \l{Building for Multiple Platforms}
\li \l{Running on Multiple Platforms}
\li \l{Deploying to Mobile Devices}
\li \l{Connecting Mobile Devices}
\endlist
\endlist
\li \list
\li \b {\l{Debugging and Analyzing}}
\list
\li \l{Debugging}
\li \l{Analyzing Code}
\endlist
\endlist
\row
\li \inlineimage creator_publishing.png
\li \inlineimage creator_advanceduse.png
\li \inlineimage creator_gettinghelp.png
\row
\li \list
\li \b {\l{Publishing}}
\list
\li \l{Publishing Qt Content for MeeGo Harmattan Devices}
\li \l{Publishing Qt Content for Maemo Devices}
\li \l{Publishing Maemo Applications to Extras-devel}
\endlist
\endlist
\li \list
\li \b {\l{Advanced Use}}
\list
\li \l{Supported Platforms}
@@ -120,8 +105,6 @@
\li \l{Keyboard Shortcuts}
\li \l{Using External Tools}
\endlist
\endlist
\li \list
\li \b {\l{Getting Help}}
\list
\li \l{Using the Help Mode}
@@ -130,7 +113,6 @@
\li \l{Known Issues}
\li \l{Glossary}
\endlist
\endlist
\row
\li {3,1} \note To report bugs and suggestions to the Qt Bug
Tracker, select \gui {Help > Report Bug}.

View File

@@ -11,6 +11,10 @@ Application {
property string toolInstallDir: project.ide_libexec_path
cpp.rpaths: qbs.targetOS.contains("osx")
? ["@executable_path/../" + project.ide_library_path]
: ["$ORIGIN/../" + project.ide_library_path]
Group {
fileTagsFilter: product.type
qbs.install: true

View File

@@ -0,0 +1,109 @@
############################################################################
#
# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the commercial license agreement provided with the
# Software or, alternatively, in accordance with the terms contained in
# a written agreement between you and Digia. For licensing terms and
# conditions see http://qt.digia.com/licensing. For further information
# use the contact form at http://qt.digia.com/contact-us.
#
# GNU Lesser General Public License Usage
# Alternatively, this file may be used under the terms of the GNU Lesser
# General Public License version 2.1 as published by the Free Software
# Foundation and appearing in the file LICENSE.LGPL included in the
# packaging of this file. Please review the following information to
# ensure the GNU Lesser General Public License version 2.1 requirements
# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
#
# In addition, as a special exception, Digia gives you certain additional
# rights. These rights are described in the Digia Qt LGPL Exception
# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#
#############################################################################
from dumper import *
def qdump__boost__bimaps__bimap(d, value):
#leftType = d.templateArgument(value.type, 0)
#rightType = d.templateArgument(value.type, 1)
size = int(value["core"]["node_count"])
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
d.putPlainChildren(value)
def qdump__boost__optional(d, value):
if int(value["m_initialized"]) == 0:
d.putValue("<uninitialized>")
d.putNumChild(0)
else:
type = d.templateArgument(value.type, 0)
storage = value["m_storage"]
if d.isReferenceType(type):
d.putItem(storage.cast(type.target().pointer()).dereference())
else:
d.putItem(storage.cast(type))
d.putBetterType(value.type)
def qdump__boost__shared_ptr(d, value):
# s boost::shared_ptr<int>
# pn boost::detail::shared_count
# pi_ 0x0 boost::detail::sp_counted_base *
# px 0x0 int *
if d.isNull(value["pn"]["pi_"]):
d.putValue("(null)")
d.putNumChild(0)
return
if d.isNull(value["px"]):
d.putValue("(null)")
d.putNumChild(0)
return
countedbase = value["pn"]["pi_"].dereference()
weakcount = int(countedbase["weak_count_"])
usecount = int(countedbase["use_count_"])
d.check(weakcount >= 0)
d.check(weakcount <= int(usecount))
d.check(usecount <= 10*1000*1000)
val = value["px"].dereference()
if d.isSimpleType(val.type):
d.putNumChild(3)
d.putItem(val)
d.putBetterType(value.type)
else:
d.putEmptyValue()
d.putNumChild(3)
if d.isExpanded():
with Children(d, 3):
d.putSubItem("data", val)
d.putIntItem("weakcount", weakcount)
d.putIntItem("usecount", usecount)
def qdump__boost__gregorian__date(d, value):
d.putValue(int(value["days_"]), JulianDate)
d.putNumChild(0)
def qdump__boost__posix_time__ptime(d, item):
ms = int(item["time_"]["time_count_"]["value_"]) / 1000
d.putValue("%s/%s" % divmod(ms, 86400000), JulianDateAndMillisecondsSinceMidnight)
d.putNumChild(0)
def qdump__boost__posix_time__time_duration(d, item):
d.putValue(int(item["ticks_"]["value_"]) / 1000, MillisecondsSinceMidnight)
d.putNumChild(0)

View File

@@ -0,0 +1,127 @@
############################################################################
#
# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the commercial license agreement provided with the
# Software or, alternatively, in accordance with the terms contained in
# a written agreement between you and Digia. For licensing terms and
# conditions see http://qt.digia.com/licensing. For further information
# use the contact form at http://qt.digia.com/contact-us.
#
# GNU Lesser General Public License Usage
# Alternatively, this file may be used under the terms of the GNU Lesser
# General Public License version 2.1 as published by the Free Software
# Foundation and appearing in the file LICENSE.LGPL included in the
# packaging of this file. Please review the following information to
# ensure the GNU Lesser General Public License version 2.1 requirements
# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
#
# In addition, as a special exception, Digia gives you certain additional
# rights. These rights are described in the Digia Qt LGPL Exception
# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#
#############################################################################
from dumper import *
def qdump__Core__Id(d, value):
try:
name = parseAndEvaluate("Core::nameForId(%d)" % value["m_id"])
d.putValue(encodeCharArray(name), Hex2EncodedLatin1)
d.putPlainChildren(value)
except:
d.putValue(value["m_id"])
d.putNumChild(0)
def qdump__Debugger__Internal__GdbMi(d, value):
str = d.encodeByteArray(value["m_name"]) + "3a20" \
+ d.encodeByteArray(value["m_data"])
d.putValue(str, Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__Debugger__Internal__WatchData(d, value):
d.putByteArrayValue(value["iname"])
d.putPlainChildren(value)
def qdump__Debugger__Internal__WatchItem(d, value):
d.putByteArrayValue(value["iname"])
d.putPlainChildren(value)
def qdump__Debugger__Internal__BreakpointModelId(d, value):
d.putValue("%s.%s" % (value["m_majorPart"], value["m_minorPart"]))
d.putPlainChildren(value)
def qdump__CPlusPlus__ByteArrayRef(d, value):
d.putValue(encodeCharArray(value["m_start"], 100, value["m_length"]),
Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__CPlusPlus__Identifier(d, value):
d.putValue(encodeCharArray(value["_chars"]), Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__CPlusPlus__IntegerType(d, value):
d.putValue(value["_kind"])
d.putPlainChildren(value)
def qdump__CPlusPlus__NamedType(d, value):
literal = downcast(value["_name"])
d.putValue(encodeCharArray(literal["_chars"]), Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__CPlusPlus__TemplateNameId(d, value):
s = encodeCharArray(value["_identifier"]["_chars"])
d.putValue(s + "3c2e2e2e3e", Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__CPlusPlus__Literal(d, value):
d.putValue(encodeCharArray(value["_chars"]), Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__CPlusPlus__StringLiteral(d, value):
d.putValue(encodeCharArray(value["_chars"]), Hex2EncodedLatin1)
d.putPlainChildren(value)
def qdump__CPlusPlus__Internal__Value(d, value):
d.putValue(value["l"])
d.putPlainChildren(value)
def qdump__Utils__FileName(d, value):
d.putStringValue(value)
d.putPlainChildren(value)
def qdump__Utils__ElfSection(d, value):
d.putByteArrayValue(value["name"])
d.putPlainChildren(value)
def qdump__CPlusPlus__Token(d, value):
k = int(value["f"]["kind"])
if int(k) == 6:
d.putValue("T_IDENTIFIER. offset: %d, len: %d"
% (value["offset"], value["f"]["length"]))
elif int(k) == 7:
d.putValue("T_NUMERIC_LITERAL. offset: %d, value: %d"
% (value["offset"], value["f"]["length"]))
elif int(k) == 60:
d.putValue("T_RPAREN")
else:
d.putValue("Type: %s" % k)
d.putPlainChildren(value)
def qdump__CPlusPlus__Internal__PPToken(d, value):
k = value["f"]["kind"];
data, size, alloc = d.byteArrayData(value["m_src"])
length = int(value["f"]["length"])
offset = int(value["offset"])
#warn("size: %s, alloc: %s, offset: %s, length: %s, data: %s"
# % (size, alloc, offset, length, data))
d.putValue(d.readMemory(data + offset, min(100, length)),
Hex2EncodedLatin1)
d.putPlainChildren(value)

View File

@@ -294,6 +294,10 @@ class DumperBase:
size = self.extractInt(addr + 4)
alloc = self.extractInt(addr + 8) & 0x7ffffff
data = addr + self.dereference(addr + 8 + self.ptrSize())
if self.ptrSize() == 4:
data = data & 0xffffffff
else:
data = data & 0xffffffffffffffff
else:
# Data:
# - QBasicAtomicInt ref;

View File

@@ -23,6 +23,10 @@ def warn(message):
from dumper import *
from qttypes import *
from stdtypes import *
from misctypes import *
from boosttypes import *
#######################################################################
#
@@ -229,7 +233,6 @@ NamespaceCode = gdb.TYPE_CODE_NAMESPACE
#Code = gdb.TYPE_CODE_DECFLOAT # Decimal floating point.
#Code = gdb.TYPE_CODE_MODULE # Fortran
#Code = gdb.TYPE_CODE_INTERNAL_FUNCTION
SimpleValueCode = -1
#######################################################################
@@ -1436,8 +1439,7 @@ class Dumper(DumperBase):
or code == CharCode \
or code == IntCode \
or code == FloatCode \
or code == EnumCode \
or code == SimpleValueCode
or code == EnumCode
def simpleEncoding(self, typeobj):
code = typeobj.code
@@ -1470,13 +1472,14 @@ class Dumper(DumperBase):
return None
def tryPutArrayContents(self, typeobj, base, n):
if not self.isSimpleType(typeobj):
enc = self.simpleEncoding(typeobj)
if not enc:
return False
size = n * typeobj.sizeof;
self.put('childtype="%s",' % typeobj)
self.put('addrbase="0x%x",' % toInteger(base))
self.put('addrstep="0x%x",' % toInteger(typeobj.sizeof))
self.put('arrayencoding="%s",' % self.simpleEncoding(typeobj))
self.put('arrayencoding="%s",' % enc)
self.put('arraydata="')
self.put(self.readMemory(base, size))
self.put('",')
@@ -1631,7 +1634,7 @@ class Dumper(DumperBase):
self.putNumChild(0)
return
if type.code == IntCode or type.code == CharCode or type.code == SimpleValueCode:
if type.code == IntCode or type.code == CharCode:
self.putType(typeName)
if value.is_optimized_out:
self.putValue("<optimized out>")
@@ -1737,7 +1740,7 @@ class Dumper(DumperBase):
if format == None and innerTypeName == "char":
# Use Latin1 as default for char *.
self.putType(typeName)
self.putValue(encodeCharArray(value), Hex2EncodedLatin1)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return
@@ -1755,35 +1758,35 @@ class Dumper(DumperBase):
if format == 1:
# Explicitly requested Latin1 formatting.
self.putType(typeName)
self.putValue(encodeCharArray(value), Hex2EncodedLatin1)
self.putValue(self.encodeCharArray(value), Hex2EncodedLatin1)
self.putNumChild(0)
return
if format == 2:
# Explicitly requested UTF-8 formatting.
self.putType(typeName)
self.putValue(encodeCharArray(value), Hex2EncodedUtf8)
self.putValue(self.encodeCharArray(value), Hex2EncodedUtf8)
self.putNumChild(0)
return
if format == 3:
# Explicitly requested local 8 bit formatting.
self.putType(typeName)
self.putValue(encodeCharArray(value), Hex2EncodedLocal8Bit)
self.putValue(self.encodeCharArray(value), Hex2EncodedLocal8Bit)
self.putNumChild(0)
return
if format == 4:
# Explicitly requested UTF-16 formatting.
self.putType(typeName)
self.putValue(encodeChar2Array(value), Hex4EncodedLittleEndian)
self.putValue(self.encodeChar2Array(value), Hex4EncodedLittleEndian)
self.putNumChild(0)
return
if format == 5:
# Explicitly requested UCS-4 formatting.
self.putType(typeName)
self.putValue(encodeChar4Array(value), Hex8EncodedLittleEndian)
self.putValue(self.encodeChar4Array(value), Hex8EncodedLittleEndian)
self.putNumChild(0)
return

View File

@@ -41,6 +41,9 @@ sys.path.insert(1, currentDir)
from dumper import *
from qttypes import *
from stdtypes import *
from misctypes import *
from boosttypes import *

View File

@@ -0,0 +1,316 @@
############################################################################
#
# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the commercial license agreement provided with the
# Software or, alternatively, in accordance with the terms contained in
# a written agreement between you and Digia. For licensing terms and
# conditions see http://qt.digia.com/licensing. For further information
# use the contact form at http://qt.digia.com/contact-us.
#
# GNU Lesser General Public License Usage
# Alternatively, this file may be used under the terms of the GNU Lesser
# General Public License version 2.1 as published by the Free Software
# Foundation and appearing in the file LICENSE.LGPL included in the
# packaging of this file. Please review the following information to
# ensure the GNU Lesser General Public License version 2.1 requirements
# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
#
# In addition, as a special exception, Digia gives you certain additional
# rights. These rights are described in the Digia Qt LGPL Exception
# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#
#############################################################################
from dumper import *
#######################################################################
#
# SSE
#
#######################################################################
def qform____m128():
return "As Floats,As Doubles"
def qdump____m128(d, value):
d.putEmptyValue()
d.putNumChild(1)
if d.isExpanded():
format = d.currentItemFormat()
if format == 2: # As Double
d.putArrayData(d.lookupType("double"), value.address, 2)
else: # Default, As float
d.putArrayData(d.lookupType("float"), value.address, 4)
#######################################################################
#
# Eigen
#
#######################################################################
#def qform__Eigen__Matrix():
# return "Transposed"
def qdump__Eigen__Matrix(d, value):
innerType = d.templateArgument(value.type, 0)
storage = value["m_storage"]
options = d.numericTemplateArgument(value.type, 3)
rowMajor = (int(options) & 0x1)
argRow = d.numericTemplateArgument(value.type, 1)
argCol = d.numericTemplateArgument(value.type, 2)
nrows = value["m_storage"]["m_rows"] if argRow == -1 else int(argRow)
ncols = value["m_storage"]["m_cols"] if argCol == -1 else int(argCol)
p = storage["m_data"]
if d.isStructType(p.type): # Static
p = p["array"].cast(innerType.pointer())
d.putValue("(%s x %s), %s" % (nrows, ncols, ["ColumnMajor", "RowMajor"][rowMajor]))
d.putField("keeporder", "1")
d.putNumChild(nrows * ncols)
limit = 10000
nncols = min(ncols, limit)
nnrows = min(nrows, limit * limit / nncols)
if d.isExpanded():
#format = d.currentItemFormat() # format == 1 is "Transposed"
with Children(d, nrows * ncols, childType=innerType):
if ncols == 1 or nrows == 1:
for i in range(0, min(nrows * ncols, 10000)):
d.putSubItem(i, (p + i).dereference())
elif rowMajor == 1:
s = 0
for i in range(0, nnrows):
for j in range(0, nncols):
v = (p + i * ncols + j).dereference()
d.putNamedSubItem(s, v, "[%d,%d]" % (i, j))
s = s + 1
else:
s = 0
for j in range(0, nncols):
for i in range(0, nnrows):
v = (p + i + j * nrows).dereference()
d.putNamedSubItem(s, v, "[%d,%d]" % (i, j))
s = s + 1
#######################################################################
#
# D
#
#######################################################################
def cleanDType(type):
return d.stripClassTag(str(type)).replace("uns long long", "string")
def qdump_Array(d, value):
n = value["length"]
p = value["ptr"]
t = cleanDType(value.type)[7:]
d.putType("%s[%d]" % (t, n))
if t == "char":
d.putValue(encodeCharArray(p, 100), Hex2EncodedLocal8Bit)
d.putNumChild(0)
else:
d.putEmptyValue()
d.putNumChild(n)
innerType = p.type
if d.isExpanded():
with Children(d, n, childType=innerType):
for i in range(0, n):
d.putSubItem(i, p.dereference())
p = p + 1
def qdump_AArray(d, value):
#n = value["length"]
# This ends up as _AArray_<key>_<value> with a single .ptr
# member of type void *. Not much that can be done here.
p = value["ptr"]
t = cleanDType(value.type)[8:]
d.putType("%s]" % t.replace("_", "["))
d.putEmptyValue()
d.putNumChild(1)
if d.isExpanded():
with Children(d, 1):
d.putSubItem("ptr", p)
#######################################################################
#
# Display Test
#
#######################################################################
if False:
# FIXME: Make that work
def qdump__Color(d, value):
v = value
d.putValue("(%s, %s, %s; %s)" % (v["r"], v["g"], v["b"], v["a"]))
d.putPlainChildren(value)
def qdump__Color_(d, value):
v = value
d.putValue("(%s, %s, %s; %s)" % (v["r"], v["g"], v["b"], v["a"]))
if d.isExpanded():
with Children(d):
with SubItem(d, "0"):
d.putItem(v["r"])
with SubItem(d, "1"):
d.putItem(v["g"])
with SubItem(d, "2"):
d.putItem(v["b"])
with SubItem(d, "3"):
d.putItem(v["a"])
if False:
def qform__basic__Function():
return "Normal,Displayed"
def qdump__basic__Function(d, value):
min = value["min"]
max = value["max"]
data, size, alloc = d.byteArrayData(value["var"])
var = extractCString(data, 0)
data, size, alloc = d.byteArrayData(value["f"])
f = extractCString(data, 0)
d.putValue("%s, %s=%f..%f" % (f, var, min, max))
d.putNumChild(0)
format = d.currentItemFormat()
if format == 1:
d.putDisplay(StopDisplay)
elif format == 2:
input = "plot [%s=%f:%f] %s" % (var, min, max, f)
d.putDisplay(DisplayProcess, input, "gnuplot")
if False:
def qdump__tree_entry(d, value):
d.putValue("len: %s, offset: %s, type: %s" %
(value["blocklength"], value["offset"], value["type"]))
d.putNumChild(0)
def qdump__tree(d, value):
count = value["count"]
entries = value["entries"]
base = value["base"].cast(d.charPtrType())
d.putItemCount(count)
d.putNumChild(count)
if d.isExpanded():
with Children(d):
with SubItem(d, "tree"):
d.putEmptyValue()
d.putNoType()
d.putNumChild(1)
if d.isExpanded():
with Children(d):
for i in xrange(count):
d.putSubItem(Item(entries[i], iname))
with SubItem(d, "data"):
d.putEmptyValue()
d.putNoType()
d.putNumChild(1)
if d.isExpanded():
with Children(d):
for i in xrange(count):
with SubItem(d, i):
entry = entries[i]
mpitype = str(entry["type"])
d.putType(mpitype)
length = int(entry["blocklength"])
offset = int(entry["offset"])
d.putValue("%s items at %s" % (length, offset))
if mpitype == "MPI_INT":
innerType = "int"
elif mpitype == "MPI_CHAR":
innerType = "char"
elif mpitype == "MPI_DOUBLE":
innerType = "double"
else:
length = 0
d.putNumChild(length)
if d.isExpanded():
with Children(d):
t = d.lookupType(innerType).pointer()
p = (base + offset).cast(t)
for j in range(length):
d.putSubItem(j, p.dereference())
#struct KRBase
#{
# enum Type { TYPE_A, TYPE_B } type;
# KRBase(Type _type) : type(_type) {}
#};
#
#struct KRA : KRBase { int x; int y; KRA():KRBase(TYPE_A),x(1),y(32) {} };
#struct KRB : KRBase { KRB():KRBase(TYPE_B) {} };
#
#void testKR()
#{
# KRBase *ptr1 = new KRA;
# KRBase *ptr2 = new KRB;
# ptr2 = new KRB;
#}
def qdump__KRBase(d, value):
if getattr(value, "__nested__", None) is None:
base = ["KRA", "KRB"][int(value["type"])]
nest = value.cast(d.lookupType(base))
nest.__nested__ = True
warn("NEST %s " % dir(nest))
d.putItem(nest)
else:
d.putName("type")
d.putValue(value["type"])
d.putNoType()
if False:
def qdump__bug5106__A5106(d, value):
d.putName("a")
d.putValue("This is the value: %s" % value["m_a"])
d.putNoType()
d.putNumChild(0)
if False:
def qdump__bug6933__Base(d, value):
d.putValue("foo")
d.putPlainChildren(value)
if False:
def qdump__gdb13393__Base(d, value):
d.putValue("Base (%s)" % value["a"])
d.putType(value.type)
d.putPlainChildren(value)
def qdump__gdb13393__Derived(d, value):
d.putValue("Derived (%s, %s)" % (value["a"], value["b"]))
d.putType(value.type)
d.putPlainChildren(value)
def qdump__KDSoapValue1(d, value):
inner = value["d"]["d"].dereference()
d.putStringValue(inner["m_name"])
if d.isExpanded():
with Children(d):
d.putFields(inner)
def qdump__KDSoapValue(d, value):
p = (value.cast(lookupType("char*")) + 4).dereference().cast(lookupType("QString"))
d.putStringValue(p)
if d.isExpanded():
with Children(d):
data = value["d"]["d"].dereference()
d.putFields(data)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,625 @@
############################################################################
#
# Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the commercial license agreement provided with the
# Software or, alternatively, in accordance with the terms contained in
# a written agreement between you and Digia. For licensing terms and
# conditions see http://qt.digia.com/licensing. For further information
# use the contact form at http://qt.digia.com/contact-us.
#
# GNU Lesser General Public License Usage
# Alternatively, this file may be used under the terms of the GNU Lesser
# General Public License version 2.1 as published by the Free Software
# Foundation and appearing in the file LICENSE.LGPL included in the
# packaging of this file. Please review the following information to
# ensure the GNU Lesser General Public License version 2.1 requirements
# will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
#
# In addition, as a special exception, Digia gives you certain additional
# rights. These rights are described in the Digia Qt LGPL Exception
# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#
#############################################################################
from dumper import *
def qdump____c_style_array__(d, value):
type = value.type.unqualified()
targetType = value[0].type
#d.putAddress(value.address)
d.putType(type)
d.putNumChild(1)
format = d.currentItemFormat()
isDefault = format == None and str(targetType.unqualified()) == "char"
if isDefault or format == 0 or format == 1 or format == 2:
blob = d.readMemory(value.address, type.sizeof)
if isDefault:
# Use Latin1 as default for char [].
d.putValue(blob, Hex2EncodedLatin1)
elif format == 0:
# Explicitly requested Latin1 formatting.
d.putValue(blob, Hex2EncodedLatin1)
elif format == 1:
# Explicitly requested UTF-8 formatting.
d.putValue(blob, Hex2EncodedUtf8)
elif format == 2:
# Explicitly requested Local 8-bit formatting.
d.putValue(blob, Hex2EncodedLocal8Bit)
else:
d.putValue("@0x%x" % d.pointerValue(value.cast(targetType.pointer())))
if d.currentIName in d.expandedINames:
p = value.address
ts = targetType.sizeof
if not d.tryPutArrayContents(targetType, p, int(type.sizeof / ts)):
with Children(d, childType=targetType,
addrBase=p, addrStep=ts):
d.putFields(value)
def qdump__std__array(d, value):
size = d.numericTemplateArgument(value.type, 1)
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
innerType = d.templateArgument(value.type, 0)
d.putArrayData(innerType, d.addressOf(value), size)
def qdump__std____1__array(d, value):
qdump__std__array(d, value)
def qdump__std__complex(d, value):
innerType = d.templateArgument(value.type, 0)
base = value.address.cast(innerType.pointer())
real = base.dereference()
imag = (base + 1).dereference()
d.putValue("(%f, %f)" % (real, imag));
d.putNumChild(2)
if d.isExpanded():
with Children(d, 2, childType=innerType):
d.putSubItem("real", real)
d.putSubItem("imag", imag)
def qdump__std__deque(d, value):
innerType = d.templateArgument(value.type, 0)
innerSize = innerType.sizeof
bufsize = 1
if innerSize < 512:
bufsize = int(512 / innerSize)
impl = value["_M_impl"]
start = impl["_M_start"]
finish = impl["_M_finish"]
size = bufsize * toInteger(finish["_M_node"] - start["_M_node"] - 1)
size += toInteger(finish["_M_cur"] - finish["_M_first"])
size += toInteger(start["_M_last"] - start["_M_cur"])
d.check(0 <= size and size <= 1000 * 1000 * 1000)
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
with Children(d, size, maxNumChild=2000, childType=innerType):
pcur = start["_M_cur"]
pfirst = start["_M_first"]
plast = start["_M_last"]
pnode = start["_M_node"]
for i in d.childRange():
d.putSubItem(i, pcur.dereference())
pcur += 1
if pcur == plast:
newnode = pnode + 1
pnode = newnode
pfirst = newnode.dereference()
plast = pfirst + bufsize
pcur = pfirst
def qdump__std____debug__deque(d, value):
qdump__std__deque(d, value)
def qdump__std__list(d, value):
head = d.dereferenceValue(value)
impl = value["_M_impl"]
node = impl["_M_node"]
size = 0
pp = d.dereference(head)
while head != pp and size <= 1001:
size += 1
pp = d.dereference(pp)
d.putItemCount(size, 1000)
d.putNumChild(size)
if d.isExpanded():
p = node["_M_next"]
innerType = d.templateArgument(value.type, 0)
with Children(d, size, maxNumChild=1000, childType=innerType):
for i in d.childRange():
innerPointer = innerType.pointer()
d.putSubItem(i, (p + 1).cast(innerPointer).dereference())
p = p["_M_next"]
def qdump__std____debug__list(d, value):
qdump__std__list(d, value)
def qform__std__map():
return mapForms()
def qdump__std__map(d, value):
impl = value["_M_t"]["_M_impl"]
size = int(impl["_M_node_count"])
d.check(0 <= size and size <= 100*1000*1000)
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
keyType = d.templateArgument(value.type, 0)
valueType = d.templateArgument(value.type, 1)
try:
# Does not work on gcc 4.4, the allocator type (fourth template
# argument) seems not to be available.
pairType = d.templateArgument(d.templateArgument(value.type, 3), 0)
pairPointer = pairType.pointer()
except:
# So use this as workaround:
pairType = d.templateArgument(impl.type, 1)
pairPointer = pairType.pointer()
isCompact = d.isMapCompact(keyType, valueType)
innerType = pairType
if isCompact:
innerType = valueType
node = impl["_M_header"]["_M_left"]
childType = innerType
if size == 0:
childType = pairType
childNumChild = 2
if isCompact:
childNumChild = None
with Children(d, size, maxNumChild=1000,
childType=childType, childNumChild=childNumChild):
for i in d.childRange():
with SubItem(d, i):
pair = (node + 1).cast(pairPointer).dereference()
if isCompact:
d.putMapName(pair["first"])
d.putItem(pair["second"])
else:
d.putEmptyValue()
if d.isExpanded():
with Children(d, 2):
d.putSubItem("first", pair["first"])
d.putSubItem("second", pair["second"])
if d.isNull(node["_M_right"]):
parent = node["_M_parent"]
while node == parent["_M_right"]:
node = parent
parent = parent["_M_parent"]
if node["_M_right"] != parent:
node = parent
else:
node = node["_M_right"]
while not d.isNull(node["_M_left"]):
node = node["_M_left"]
def qdump__std____debug__map(d, value):
qdump__std__map(d, value)
def qdump__std____debug__set(d, value):
qdump__std__set(d, value)
def qdump__std____cxx1998__map(d, value):
qdump__std__map(d, value)
def stdTreeIteratorHelper(d, value):
pnode = value["_M_node"]
node = pnode.dereference()
d.putNumChild(1)
d.putEmptyValue()
if d.isExpanded():
dataType = d.templateArgument(value.type, 0)
nodeType = d.lookupType("std::_Rb_tree_node<%s>" % dataType)
data = pnode.cast(nodeType.pointer()).dereference()["_M_value_field"]
with Children(d):
try:
d.putSubItem("first", data["first"])
d.putSubItem("second", data["second"])
except:
d.putSubItem("value", data)
with SubItem(d, "node"):
d.putNumChild(1)
d.putEmptyValue()
d.putType(" ")
if d.isExpanded():
with Children(d):
d.putSubItem("color", node["_M_color"])
d.putSubItem("left", node["_M_left"])
d.putSubItem("right", node["_M_right"])
d.putSubItem("parent", node["_M_parent"])
def qdump__std___Rb_tree_iterator(d, value):
stdTreeIteratorHelper(d, value)
def qdump__std___Rb_tree_const_iterator(d, value):
stdTreeIteratorHelper(d, value)
def qdump__std__map__iterator(d, value):
stdTreeIteratorHelper(d, value)
def qdump____gnu_debug___Safe_iterator(d, value):
d.putItem(value["_M_current"])
def qdump__std__map__const_iterator(d, value):
stdTreeIteratorHelper(d, value)
def qdump__std__set__iterator(d, value):
stdTreeIteratorHelper(d, value)
def qdump__std__set__const_iterator(d, value):
stdTreeIteratorHelper(d, value)
def qdump__std____cxx1998__set(d, value):
qdump__std__set(d, value)
def qdump__std__set(d, value):
impl = value["_M_t"]["_M_impl"]
size = int(impl["_M_node_count"])
d.check(0 <= size and size <= 100*1000*1000)
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
valueType = d.templateArgument(value.type, 0)
node = impl["_M_header"]["_M_left"]
with Children(d, size, maxNumChild=1000, childType=valueType):
for i in d.childRange():
d.putSubItem(i, (node + 1).cast(valueType.pointer()).dereference())
if d.isNull(node["_M_right"]):
parent = node["_M_parent"]
while node == parent["_M_right"]:
node = parent
parent = parent["_M_parent"]
if node["_M_right"] != parent:
node = parent
else:
node = node["_M_right"]
while not d.isNull(node["_M_left"]):
node = node["_M_left"]
def qdump__std__stack(d, value):
qdump__std__deque(d, value["c"])
def qdump__std____debug__stack(d, value):
qdump__std__stack(d, value)
def qform__std__string():
return "Inline,In Separate Window"
def qdump__std__string(d, value):
qdump__std__stringHelper1(d, value, 1)
def qdump__std__stringHelper1(d, value, charSize):
data = value["_M_dataplus"]["_M_p"]
# We can't lookup the std::string::_Rep type without crashing LLDB,
# so hard-code assumption on member position
# struct { size_type _M_length, size_type _M_capacity, int _M_refcount; }
sizePtr = data.cast(d.sizetType().pointer())
size = int(sizePtr[-3])
alloc = int(sizePtr[-2])
refcount = int(sizePtr[-1])
d.check(refcount >= -1) # Can be -1 accoring to docs.
d.check(0 <= size and size <= alloc and alloc <= 100*1000*1000)
qdump_stringHelper(d, sizePtr, size * charSize, charSize)
def qdump_stringHelper(d, data, size, charSize):
cutoff = min(size, qqStringCutOff)
mem = d.readMemory(data, cutoff)
if charSize == 1:
encodingType = Hex2EncodedLatin1
displayType = DisplayLatin1String
elif charSize == 2:
encodingType = Hex4EncodedLittleEndian
displayType = DisplayUtf16String
else:
encodingType = Hex8EncodedLittleEndian
displayType = DisplayUtf16String
d.putNumChild(0)
d.putValue(mem, encodingType)
format = d.currentItemFormat()
if format == 1:
d.putDisplay(StopDisplay)
elif format == 2:
d.putField("editformat", displayType)
d.putField("editvalue", d.readMemory(data, size))
def qdump__std____1__string(d, value):
inner = d.childAt(d.childAt(value["__r_"]["__first_"], 0), 0)
size = int(inner["__size_"])
alloc = int(inner["__cap_"])
data = d.pointerValue(inner["__data_"])
qdump_stringHelper(d, data, size, 1)
d.putType("std::string")
def qdump__std____1__wstring(d, value):
inner = d.childAt(d.childAt(value["__r_"]["__first_"], 0), 0)
size = int(inner["__size_"]) * 4
alloc = int(inner["__cap_"])
data = d.pointerValue(inner["__data_"])
qdump_stringHelper(d, data, size, 4)
d.putType("std::wstring")
def qdump__std__shared_ptr(d, value):
i = value["_M_ptr"]
if d.isNull(i):
d.putValue("(null)")
d.putNumChild(0)
return
if d.isSimpleType(d.templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference(), d.pointerValue(i)))
else:
i = expensiveDowncast(i)
d.putValue("@0x%x" % d.pointerValue(i))
d.putNumChild(3)
with Children(d, 3):
d.putSubItem("data", i)
refcount = value["_M_refcount"]["_M_pi"]
d.putIntItem("usecount", refcount["_M_use_count"])
d.putIntItem("weakcount", refcount["_M_weak_count"])
def qdump__std____1__shared_ptr(d, value):
i = value["__ptr_"]
if d.isNull(i):
d.putValue("(null)")
d.putNumChild(0)
return
if d.isSimpleType(d.templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference().value, d.pointerValue(i)))
else:
d.putValue("@0x%x" % d.pointerValue(i))
d.putNumChild(3)
with Children(d, 3):
d.putSubItem("data", i.dereference())
d.putFields(value["__cntrl_"].dereference())
#d.putIntItem("usecount", refcount["_M_use_count"])
#d.putIntItem("weakcount", refcount["_M_weak_count"])
def qdump__std__unique_ptr(d, value):
i = value["_M_t"]["_M_head_impl"]
if d.isNull(i):
d.putValue("(null)")
d.putNumChild(0)
return
if d.isSimpleType(d.templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference(), d.pointerValue(i)))
else:
i = expensiveDowncast(i)
d.putValue("@0x%x" % d.pointerValue(i))
d.putNumChild(1)
with Children(d, 1):
d.putSubItem("data", i)
def qdump__std____1__unique_ptr(d, value):
i = d.childAt(d.childAt(value["__ptr_"], 0), 0)
if d.isNull(i):
d.putValue("(null)")
d.putNumChild(0)
return
if d.isSimpleType(d.templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference().value, d.pointerValue(i)))
else:
d.putValue("@0x%x" % d.pointerValue(i))
d.putNumChild(1)
with Children(d, 1):
d.putSubItem("data", i.dereference())
def qform__std__unordered_map():
return mapForms()
def qform__std____debug__unordered_map():
return mapForms()
def qdump__std__unordered_map(d, value):
try:
size = value["_M_element_count"]
start = value["_M_before_begin"]["_M_nxt"]
except:
size = value["_M_h"]["_M_element_count"]
start = value["_M_h"]["_M_bbegin"]["_M_node"]["_M_nxt"]
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
p = d.pointerValue(start)
keyType = d.templateArgument(value.type, 0)
valueType = d.templateArgument(value.type, 1)
allocatorType = d.templateArgument(value.type, 4)
pairType = d.templateArgument(allocatorType, 0)
ptrSize = d.ptrSize()
if d.isMapCompact(keyType, valueType):
with Children(d, size, childType=valueType):
for i in d.childRange():
pair = d.createValue(p + ptrSize, pairType)
with SubItem(d, i):
d.putField("iname", d.currentIName)
d.putName("[%s] %s" % (i, pair["first"]))
d.putValue(pair["second"])
p = d.dereference(p)
else:
with Children(d, size, childType=pairType):
for i in d.childRange():
d.putSubItem(i, d.createValue(p + ptrSize, pairType))
p = d.dereference(p)
def qdump__std____debug__unordered_map(d, value):
qdump__std__unordered_map(d, value)
def qdump__std__unordered_set(d, value):
try:
size = value["_M_element_count"]
start = value["_M_before_begin"]["_M_nxt"]
except:
size = value["_M_h"]["_M_element_count"]
start = value["_M_h"]["_M_bbegin"]["_M_node"]["_M_nxt"]
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
p = d.pointerValue(start)
valueType = d.templateArgument(value.type, 0)
with Children(d, size, childType=valueType):
ptrSize = d.ptrSize()
for i in d.childRange():
d.putSubItem(i, d.createValue(p + ptrSize, valueType))
p = d.dereference(p)
def qdump__std____debug__unordered_set(d, value):
qdump__std__unordered_set(d, value)
def qedit__std__vector(expr, value):
values = value.split(',')
n = len(values)
ob = gdb.parse_and_eval(expr)
innerType = d.templateArgument(ob.type, 0)
cmd = "set $d = (%s*)calloc(sizeof(%s)*%s,1)" % (innerType, innerType, n)
gdb.execute(cmd)
cmd = "set {void*[3]}%s = {$d, $d+%s, $d+%s}" % (ob.address, n, n)
gdb.execute(cmd)
cmd = "set (%s[%d])*$d={%s}" % (innerType, n, value)
gdb.execute(cmd)
def qdump__std__vector(d, value):
impl = value["_M_impl"]
type = d.templateArgument(value.type, 0)
alloc = impl["_M_end_of_storage"]
isBool = str(type) == 'bool'
if isBool:
start = impl["_M_start"]["_M_p"]
finish = impl["_M_finish"]["_M_p"]
# FIXME: 8 is CHAR_BIT
storage = d.lookupType("unsigned long")
storagesize = storage.sizeof * 8
size = (finish - start) * storagesize
size += impl["_M_finish"]["_M_offset"]
size -= impl["_M_start"]["_M_offset"]
else:
start = impl["_M_start"]
finish = impl["_M_finish"]
size = finish - start
d.check(0 <= size and size <= 1000 * 1000 * 1000)
d.check(finish <= alloc)
d.checkPointer(start)
d.checkPointer(finish)
d.checkPointer(alloc)
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
if isBool:
with Children(d, size, maxNumChild=10000, childType=type):
for i in d.childRange():
q = start + int(i / storagesize)
d.putBoolItem(str(i), (q.dereference() >> (i % storagesize)) & 1)
else:
d.putArrayData(type, start, size)
def qdump__std____1__vector(d, value):
innerType = d.templateArgument(value.type, 0)
if d.isLldb and d.childAt(value, 0).type == innerType:
# That's old lldb automatically formatting
begin = d.dereferenceValue(value)
size = value.GetNumChildren()
else:
# Normal case
begin = d.pointerValue(value['__begin_'])
end = d.pointerValue(value['__end_'])
size = (end - begin) / innerType.sizeof
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded():
d.putArrayData(innerType, begin, size)
def qdump__std____debug__vector(d, value):
qdump__std__vector(d, value)
def qedit__std__string(expr, value):
cmd = "print (%s).assign(\"%s\")" % (expr, value)
gdb.execute(cmd)
def qedit__string(expr, value):
qedit__std__string(expr, value)
def qdump__string(d, value):
qdump__std__string(d, value)
def qdump__std__wstring(d, value):
charSize = d.lookupType('wchar_t').sizeof
qdump__std__stringHelper1(d, value, charSize)
def qdump__std__basic_string(d, value):
innerType = d.templateArgument(value.type, 0)
qdump__std__stringHelper1(d, value, innerType.sizeof)
def qdump__wstring(d, value):
qdump__std__wstring(d, value)
def qdump____gnu_cxx__hash_set(d, value):
ht = value["_M_ht"]
size = int(ht["_M_num_elements"])
d.check(0 <= size and size <= 1000 * 1000 * 1000)
d.putItemCount(size)
d.putNumChild(size)
type = d.templateArgument(value.type, 0)
d.putType("__gnu__cxx::hash_set<%s>" % type)
if d.isExpanded():
with Children(d, size, maxNumChild=1000, childType=type):
buckets = ht["_M_buckets"]["_M_impl"]
bucketStart = buckets["_M_start"]
bucketFinish = buckets["_M_finish"]
p = bucketStart
itemCount = 0
for i in xrange(toInteger(bucketFinish - bucketStart)):
if not d.isNull(p.dereference()):
cur = p.dereference()
while not d.isNull(cur):
with SubItem(d, itemCount):
d.putValue(cur["_M_val"])
cur = cur["_M_next"]
itemCount += 1
p = p + 1
def qdump__uint8_t(d, value):
d.putNumChild(0)
d.putValue(int(value))
def qdump__int8_t(d, value):
d.putNumChild(0)
d.putValue(int(value))

View File

@@ -38,7 +38,7 @@ QT_BEGIN_NAMESPACE
class QScriptEngine;
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.
class QMLJSDEBUGGER_EXTERN QDeclarativeDebugHelper
{

View File

@@ -34,7 +34,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error
// Load settings
// Add actions to menus
// 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.
Q_UNUSED(arguments)
@@ -57,7 +57,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error
void %PluginName%Plugin::extensionsInitialized()
{
// 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.
}

View File

@@ -123,7 +123,7 @@ Button {
text: control.text
color: control.pressed || control.checked ? "lightGray" : "black"
font.pixelSize: 15
font.bold: true
font.bold: false
smooth: true
}
}

View File

@@ -46,11 +46,13 @@ Item {
spacing: 7
Rectangle {
Image {
source: "images/sessions.png"
anchors.verticalCenter: projectNameText.verticalCenter
width: 16
height: 16
color: "#7e7e7e"
}
LinkedText {
id: text

View File

@@ -104,13 +104,7 @@ ColumnLayout {
Text {
text: qsTr("New to Qt?")
font.pixelSize: 18
font.bold: true
}
Text {
text: qsTr("Get Started Now!")
font.pixelSize: 14
font.bold: true
font.bold: false
}
Text {
@@ -126,23 +120,24 @@ ColumnLayout {
}
Button {
text: qsTr("Get Started")
text: qsTr("Get Started Now")
onClicked: gettingStarted.openSplitHelp("qthelp://org.qt-project.qtcreator/doc/creator-getting-started.html")
}
Item {
height: 8
height: 18
width: parent.width
}
Column {
x: 14
RowLayout {
spacing: 16
Row {
spacing: 7
Rectangle {
Image {
width: 16
height: 16
color: "#4e4e4e"
height: 15
source: "images/icons/onlineCommunity.png"
}
LinkedText {
text: qsTr("Online Community")
@@ -151,12 +146,12 @@ ColumnLayout {
onClicked: gettingStarted.openUrl("http://qt-project.org/forums")
}
}
RowLayout {
Row {
spacing: 7
Rectangle {
width: 16
height: 16
color: "#4e4e4e"
Image {
height: 15
width: 15
source: "images/icons/blogs.png"
}
LinkedText {
text: qsTr("Blogs")
@@ -165,12 +160,12 @@ ColumnLayout {
onClicked: gettingStarted.openUrl("http://planet.qt-project.org")
}
}
RowLayout {
Row {
spacing: 7
Rectangle {
Image {
width: 16
height: 16
color: "#4e4e4e"
height: 15
source: "images/icons/userGuide.png"
}
LinkedText {
text: qsTr("User Guide")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -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.
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.
*/

View File

@@ -56,7 +56,7 @@
other components in the Aggregate to the outside.
Specifically that means:
\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.
\endlist
Components can be of any QObject derived type.
@@ -69,7 +69,7 @@
[...]
MyInterface *object = new MyInterface; // this is single inheritance
\endcode
The query method works like a qobject_cast with normal objects:
The query function works like a qobject_cast with normal objects:
\code
Q_ASSERT(query<MyInterface>(object) == object);
Q_ASSERT(query<MyInterfaceEx>(object) == 0);
@@ -105,7 +105,7 @@
/*!
\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.
\sa Aggregate::components()
@@ -115,7 +115,7 @@
/*!
\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::add()

View File

@@ -474,7 +474,7 @@ void Document::setGlobalNamespace(Namespace *globalNamespace)
* 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
* 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.
*
* \param line the line number, starting with line 1

View File

@@ -687,7 +687,7 @@ QString Preprocessor::State::guardStateToString(int guardState)
* occurs inside the #ifndef block, but not nested inside other
* #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.
*
* @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
// that generated the token still needs to be blocked (!), which is
// 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 {
// No token buffer, so have the lexer scan the next token.
tk->setSource(m_state.m_source);

View File

@@ -64,10 +64,10 @@
\list 1
\li All plugin libraries are loaded in \e{root-to-leaf} order of the
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
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
be sure that all plugins that depend on this plugin have
been initialized completely (implying that they have put
@@ -79,7 +79,7 @@
Plugins have access to the plugin manager
(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
has been created.
The initialize methods of plugins that depend
on this plugin are called after the initialize method of this plugin
The initialize functions of plugins that depend
on this plugin are called after the initialize function of this plugin
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
describing the reason.
@@ -100,11 +100,11 @@
/*!
\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()
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
look in the plugin manager's object pool for objects that have
been provided by dependent plugins.
@@ -115,17 +115,17 @@
/*!
\fn bool IPlugin::delayedInitialize()
\brief Called after all plugins' IPlugin::extensionsInitialized() method has been called,
and after the IPlugin::delayedInitialize() method of plugins that depend on this plugin
\brief Called after all plugins' IPlugin::extensionsInitialized() function has been called,
and after the IPlugin::delayedInitialize() function of plugins that depend on this plugin
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
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
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
short time afterwards. This can increase the felt plugin/application startup
time a lot, with very little effort.
@@ -139,16 +139,16 @@
\brief Called during a shutdown sequence in the same order as initialization
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.
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,
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
has finished, until all plugins requesting AsynchronousShutdown have sent
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.
Returns IPlugin::AsynchronousShutdown if the plugin needs to perform
@@ -160,7 +160,7 @@
/*!
\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
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
arguments are passed in \a arguments.
@@ -215,7 +215,7 @@ PluginSpec *IPlugin::pluginSpec() const
/*!
\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().
*/
void IPlugin::addObject(QObject *obj)
@@ -225,7 +225,7 @@ void IPlugin::addObject(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
the object pool and deleted by hand.
Objects added to the pool via addAutoReleasedObject are automatically
@@ -241,7 +241,7 @@ void IPlugin::addAutoReleasedObject(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().
*/
void IPlugin::removeObject(QObject *obj)

View File

@@ -91,7 +91,7 @@ void PluginErrorView::update(PluginSpec *spec)
break;
case PluginSpec::Initialized:
text = tr("Initialized");
tooltip = tr("Plugin's initialization method succeeded");
tooltip = tr("Plugin's initialization function succeeded");
break;
case PluginSpec::Running:
text = tr("Running");

View File

@@ -108,8 +108,8 @@ enum { debugLeaks = 0 };
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
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.
these methods use the Aggregation::query methods instead of a qobject_cast to determine
via the getObjects() and getObject() functions. They are aware of Aggregation::Aggregate, i.e.
these functions use the Aggregation::query functions instead of a qobject_cast to determine
the matching objects.
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
linked against the "provider" plugin nor a common shared
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
{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.
This method is aware of Aggregation::Aggregate. That is, it uses
the \c Aggregation::query methods instead of \c qobject_cast to
This function is aware of Aggregation::Aggregate. That is, it uses
the \c Aggregation::query functions instead of \c qobject_cast to
determine the type of an object.
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()
*/
@@ -234,8 +234,8 @@ enum { debugLeaks = 0 };
Retrieves all objects of a given type from the object pool.
This method is aware of Aggregation::Aggregate. That is, it uses
the \c Aggregation::query methods instead of \c qobject_cast to
This function is aware of Aggregation::Aggregate. That is, it uses
the \c Aggregation::query functions instead of \c qobject_cast to
determine the type of an object.
\sa addObject()
@@ -570,7 +570,7 @@ void PluginManager::remoteArguments(const QString &serializedArgument, QObject *
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.
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
a descriptive message of the error.
@@ -675,7 +675,7 @@ void PluginManager::startTests()
if (!pluginSpec->plugin())
continue;
// Collect all test functions/methods of the plugin.
// Collect all test functions of the plugin.
QStringList allTestFunctions;
const QMetaObject *metaObject = pluginSpec->plugin()->metaObject();

View File

@@ -128,19 +128,19 @@
information is available via the PluginSpec.
\value Resolved
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
The plugin's library is loaded and the plugin instance created
(available through plugin()).
\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.
\value Running
The plugin's dependencies are successfully initialized and
extensionsInitialized has been called. The loading process is
complete.
\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
The plugin instance has been deleted.
*/

View File

@@ -751,7 +751,7 @@ public:
: AST(Kind_StructField), name(_name), type(0) {}
// 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.
Field(const QString *_name, TypeAST *_type)
: AST(Kind_StructField), name(_name), type(_type) {}

View File

@@ -301,7 +301,7 @@ void QPacketProtocol::clear()
/*!
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()
{

View File

@@ -44,13 +44,13 @@ QT_BEGIN_NAMESPACE
QmlError includes a textual description of the error, as well
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:
\code
file:///home/user/test.qml:7:8: Invalid property assignment: double expected
\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
and include additional contextual information.
\code

View File

@@ -1464,7 +1464,7 @@ bool Check::visit(TypeOfExpression *ast)
/// When something is changed here, also change ReadingContext::lookupProperty in
/// 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)
{
if (!_importsOk)

View File

@@ -46,10 +46,10 @@ using namespace QmlJS;
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.
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
of its value.

View File

@@ -64,7 +64,7 @@ namespace Internal {
* 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.
*
* Especially the collect* methods are thought as low level interface.
* Especially the collect* functions are thought as low level interface.
*/
class QrcParserPrivate
{

View File

@@ -40,7 +40,7 @@ using namespace QmlJS;
a specific location.
\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.
Once constructed for a Document in a Context it represents the root scope of

View File

@@ -50,8 +50,8 @@ enum { debug = 0 };
\brief The SymbolGroup class creates a symbol group storing a tree of
expanded symbols rooted on a fake "locals" root element.
Provides a find() method based on inames ("locals.this.i1.data") and
dump() methods used for GDBMI-format dumping and debug helpers.
Provides a find() function based on inames ("locals.this.i1.data") and
dump() functions used for GDBMI-format dumping and debug helpers.
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
types.

View File

@@ -2603,7 +2603,8 @@ static inline bool dumpQSharedPointer(const SymbolGroupValue &v, std::wostream &
if (strongRef < 0 || weakRef < 0)
return false;
str << L"References: " << strongRef << '/' << weakRef;
*specialInfoIn = valueV.node();
if (specialInfoIn)
*specialInfoIn = valueV.node();
return true;
}

View File

@@ -42,15 +42,15 @@ namespace Utils {
Also, one instance of this class should not handle multiple streams (at least not
at the same time).
Its main method is parseText(), which accepts text and default QTextCharFormat.
This method is designed to parse text and split colored text to smaller strings,
Its main function is parseText(), which accepts text and default QTextCharFormat.
This function is designed to parse text and split colored text to smaller strings,
with their appropriate formatting information set inside QTextCharFormat.
Usage:
\list
\li Create new instance of AnsiEscapeCodeHandler for a stream.
\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.
\endlist
*/

View File

@@ -112,7 +112,7 @@ void FileInProjectFinder::setSysroot(const QString &sysroot)
/*!
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
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

View File

@@ -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
* 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.
*
* 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
* 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.
*
* 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
* 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
* 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
* 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.
*
* 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
* 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
* supplied union index.

View File

@@ -263,7 +263,7 @@ class JsonSchemaManager;
* corresponding nested schema. Afterwards, it's expected that one would "leave" such nested
* 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.
*
*/
@@ -350,7 +350,7 @@ private:
QStringList properties(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);

View File

@@ -97,7 +97,7 @@ bool ToolTip::acceptShow(const TipContent &content,
}
#if !defined(QT_NO_EFFECTS) && !defined(Q_OS_MAC)
// 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
&& (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)
|| QApplication::isEffectEnabled(Qt::UI_AnimateTooltip))) {

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>250</width>
<height>149</height>
<height>161</height>
</rect>
</property>
<property name="windowTitle">
@@ -63,6 +63,9 @@
<property name="maximum">
<number>9999999</number>
</property>
<property name="value">
<number>200</number>
</property>
</widget>
</item>
<item row="1" column="1">

View File

@@ -502,17 +502,37 @@ QString AndroidConfigurations::createAVD(const QString &target, const QString &n
QProcess proc;
proc.start(androidToolPath().toString(),
QStringList() << QLatin1String("create") << QLatin1String("avd")
<< QLatin1String("-a") << QLatin1String("-t") << target
<< QLatin1String("-t") << target
<< QLatin1String("-n") << name
<< QLatin1String("-b") << abi
<< QLatin1String("-c") << QString::fromLatin1("%1M").arg(sdcardSize));
if (!proc.waitForStarted())
return QString();
proc.write(QByteArray("no\n"));
if (!proc.waitForFinished(-1)) {
proc.terminate();
return QString();
proc.write(QByteArray("yes\n")); // yes to "Do you wish to create a custom hardware profile"
QByteArray question;
while (true) {
proc.waitForReadyRead(500);
question += proc.readAllStandardOutput();
if (question.endsWith(QByteArray("]:"))) {
// truncate to last line
int index = question.lastIndexOf(QByteArray("\n"));
if (index != -1)
question = question.mid(index);
if (question.contains("hw.gpu.enabled"))
proc.write(QByteArray("yes\n"));
else
proc.write(QByteArray("\n"));
question.clear();
}
if (proc.state() != QProcess::Running)
break;
}
proc.waitForFinished();
if (proc.exitCode()) // error!
return QString();
return name;
@@ -787,10 +807,10 @@ void AndroidConfigurations::updateAutomaticKitList()
// register new kits
QList<Kit *> newKits;
foreach (AndroidToolChain *tc, toolchains) {
if (tc->isSecondaryToolChain())
continue;
QList<QtSupport::BaseQtVersion *> qtVersions = qtVersionsForArch.value(tc->targetAbi().architecture());
foreach (QtSupport::BaseQtVersion *qt, qtVersions) {
if (tc->secondaryToolChain())
continue;
Kit *newKit = new Kit;
newKit->setAutoDetected(true);
newKit->setIconPath(Utils::FileName::fromString(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY_ICON)));
@@ -798,7 +818,15 @@ void AndroidConfigurations::updateAutomaticKitList()
ToolChainKitInformation::setToolChain(newKit, tc);
QtSupport::QtKitInformation::setQtVersion(newKit, qt);
DeviceKitInformation::setDevice(newKit, device);
Debugger::DebuggerKitInformation::setDebugger(newKit, tc->suggestedDebugger());
Debugger::DebuggerItem debugger;
debugger.setCommand(tc->suggestedDebugger());
debugger.setEngineType(Debugger::GdbEngineType);
debugger.setDisplayName(tr("Android Debugger for %1").arg(tc->displayName()));
debugger.setAutoDetected(true);
debugger.setAbi(tc->targetAbi());
Debugger::DebuggerKitInformation::setDebugger(newKit, debugger);
AndroidGdbServerKitInformation::setGdbSever(newKit, tc->suggestedGdbServer());
newKit->makeSticky();
newKits << newKit;
@@ -879,6 +907,24 @@ AndroidConfigurations::AndroidConfigurations(QObject *parent)
this, SLOT(clearDefaultDevices(ProjectExplorer::Project*)));
}
Utils::FileName javaHomeForJavac(const QString &location)
{
QFileInfo fileInfo(location);
int tries = 5;
while (tries > 0) {
QDir dir = fileInfo.dir();
dir.cdUp();
if (QFileInfo(dir.filePath(QLatin1String("lib/tools.jar"))).exists())
return Utils::FileName::fromString(dir.path());
if (fileInfo.isSymLink())
fileInfo.setFile(fileInfo.symLinkTarget());
else
break;
--tries;
}
return Utils::FileName();
}
void AndroidConfigurations::load()
{
bool saveSettings = false;
@@ -897,14 +943,18 @@ void AndroidConfigurations::load()
}
if (m_config.openJDKLocation.isEmpty()) {
Environment env = Environment::systemEnvironment();
QString location = env.searchInPath(QLatin1String("javac"));
QFileInfo fi(location);
if (fi.exists() && fi.isExecutable() && !fi.isDir()) {
QDir parentDirectory = fi.canonicalPath();
parentDirectory.cdUp(); // one up from bin
m_config.openJDKLocation = FileName::fromString(parentDirectory.absolutePath());
saveSettings = true;
if (HostOsInfo::isLinuxHost()) {
Environment env = Environment::systemEnvironment();
QString location = env.searchInPath(QLatin1String("javac"));
QFileInfo fi(location);
if (fi.exists() && fi.isExecutable() && !fi.isDir()) {
m_config.openJDKLocation = javaHomeForJavac(location);
saveSettings = true;
}
} else if (HostOsInfo::isMacHost()) {
QString javaHome = QLatin1String("/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home");
if (QFileInfo(javaHome).exists())
m_config.openJDKLocation = Utils::FileName::fromString(javaHome);
} else if (HostOsInfo::isWindowsHost()) {
QSettings settings(QLatin1String("HKEY_LOCAL_MACHINE\\SOFTWARE\\Javasoft\\Java Development Kit"), QSettings::NativeFormat);
QStringList allVersions = settings.childGroups();

View File

@@ -94,7 +94,7 @@ void AndroidDeployStep::ctor()
connect(ProjectExplorer::KitManager::instance(), SIGNAL(kitUpdated(ProjectExplorer::Kit*)),
this, SLOT(kitUpdated(ProjectExplorer::Kit *)));
this, SLOT(kitUpdated(ProjectExplorer::Kit*)));
}
bool AndroidDeployStep::init()

View File

@@ -99,5 +99,10 @@ IDevice::Ptr AndroidDevice::clone() const
return IDevice::Ptr(new AndroidDevice(*this));
}
QString AndroidDevice::qmlProfilerHost() const
{
return QLatin1String("localhost");
}
} // namespace Internal
} // namespace Android

View File

@@ -50,6 +50,7 @@ public:
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const;
ProjectExplorer::IDevice::Ptr clone() const;
QString qmlProfilerHost() const;
protected:
friend class AndroidDeviceFactory;

View File

@@ -99,8 +99,7 @@ AndroidManifestEditorWidget::AndroidManifestEditorWidget(QWidget *parent, TextEd
: TextEditor::PlainTextEditorWidget(parent),
m_dirty(false),
m_stayClean(false),
m_setAppName(false),
m_ah(ah)
m_setAppName(false)
{
QSharedPointer<AndroidManifestDocument> doc(new AndroidManifestDocument(this));
doc->setMimeType(QLatin1String(Constants::ANDROID_MANIFEST_MIME_TYPE));
@@ -875,7 +874,11 @@ int extractVersion(const QString &string)
int index = string.indexOf(QLatin1Char(':'));
if (index == -1)
return 0;
#if QT_VERSION < 0x050000
return string.mid(4, index - 4).toInt();
#else
return string.midRef(4, index - 4).toInt();
#endif
}
void AndroidManifestEditorWidget::syncToEditor()

View File

@@ -166,7 +166,6 @@ private:
QPushButton *m_removePermissionButton;
QComboBox *m_permissionsComboBox;
TextEditor::TextEditorActionHandler *m_ah;
QWidget *m_overlayWidget;
QTimer m_timerParseCheck;
};

View File

@@ -229,12 +229,12 @@ QString AndroidToolChain::makeCommand(const Utils::Environment &env) const
return tmp.isEmpty() ? make : tmp;
}
QString AndroidToolChain::ndkToolChainVersion()
QString AndroidToolChain::ndkToolChainVersion() const
{
return m_ndkToolChainVersion;
}
bool AndroidToolChain::secondaryToolChain() const
bool AndroidToolChain::isSecondaryToolChain() const
{
return m_secondaryToolChain;
}

View File

@@ -59,9 +59,9 @@ public:
QList<Utils::FileName> suggestedMkspecList() const;
QString makeCommand(const Utils::Environment &environment) const;
QString ndkToolChainVersion();
QString ndkToolChainVersion() const;
bool secondaryToolChain() const;
bool isSecondaryToolChain() const;
void setSecondaryToolChain(bool b);
protected:

View File

@@ -119,7 +119,7 @@ private:
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
* folder exists, it will be created recursively.
*/

View File

@@ -75,7 +75,7 @@ private:
AutotoolsProject *m_project;
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.
friend class AutotoolsProject;
};

View File

@@ -65,7 +65,7 @@ public:
/**
* 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,
* the makefile could not be opened.
*/
@@ -116,15 +116,15 @@ public:
QStringList cxxflags() const;
/**
* Cancels the parsing. Calling this method only makes sense, if the
* parser runs in a different thread than the caller of this method.
* The method is thread-safe.
* Cancels the parsing. Calling this function only makes sense, if the
* parser runs in a different thread than the caller of this function.
* The function is thread-safe.
*/
void 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;
@@ -176,14 +176,14 @@ private:
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.
*/
QStringList directorySources(const QString &directory,
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
* 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
* 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.
*/
void addAllSources();
@@ -218,7 +218,7 @@ private:
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.
* The headerfile base name is defined by \p fileName.
*/

View File

@@ -32,7 +32,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>GDB Host:</string>
<string>GDB host:</string>
</property>
</widget>
</item>
@@ -45,7 +45,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>GDB Port:</string>
<string>GDB port:</string>
</property>
</widget>
</item>

View File

@@ -41,7 +41,7 @@ BareMetalDeviceConfigurationWizardSetupPage::BareMetalDeviceConfigurationWizardS
QWizardPage(parent), d(new Internal::BareMetalDeviceConfigurationWizardSetupPagePrivate)
{
d->ui.setupUi(this);
setTitle(tr("Gdbserver/hardware debugger setup"));
setTitle(tr("Set up GDB Server or Hardware Debugger"));
setSubTitle(QLatin1String(" ")); // For Qt bug (background color)
connect(d->ui.hostNameLineEdit,SIGNAL(textChanged(QString)),SIGNAL(completeChanged()));
connect(d->ui.nameLineEdit,SIGNAL(textChanged(QString)),SIGNAL(completeChanged()));

View File

@@ -157,9 +157,9 @@ QString BareMetalRunConfiguration::defaultDisplayName()
{
if (!d->projectFilePath.isEmpty())
//: %1 is the name of the project run via hardware debugger
return tr("%1 (via gdbserver/hardware debugger)").arg(QFileInfo(d->projectFilePath).completeBaseName());
return tr("%1 (via GDB server or hardware debugger)").arg(QFileInfo(d->projectFilePath).completeBaseName());
//: Bare Metal run configuration default run name
return tr("Run on gdbserver/hardware debugger");
return tr("Run on GDB server or hardware debugger");
}
QString BareMetalRunConfiguration::localExecutableFilePath() const

View File

@@ -98,7 +98,7 @@ QList<Core::Id> BareMetalRunConfigurationFactory::availableCreationIds(Target *p
QString BareMetalRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
return tr("%1 (on gdbserver/Hardware Debugger)")
return tr("%1 (on GDB server or hardware debugger)")
.arg(QFileInfo(pathFromId(id)).completeBaseName());
}

View File

@@ -128,6 +128,16 @@ QString BazaarClient::findTopLevelForFile(const QFileInfo &file) const
repositoryCheckFile);
}
bool BazaarClient::managesFile(const QString &workingDirectory, const QString &fileName) const
{
QStringList args(QLatin1String("status"));
args << fileName;
QByteArray stdOut;
if (!vcsFullySynchronousExec(workingDirectory, args, &stdOut))
return false;
return !stdOut.startsWith("unknown");
}
void BazaarClient::view(const QString &source, const QString &id, const QStringList &extraOptions)
{
QStringList args(QLatin1String("log"));

View File

@@ -57,6 +57,7 @@ public:
void view(const QString &source, const QString &id,
const QStringList &extraOptions = QStringList());
QString findTopLevelForFile(const QFileInfo &file) const;
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
protected:
Core::Id vcsEditorKind(VcsCommand cmd) const;

View File

@@ -61,6 +61,11 @@ bool BazaarControl::managesDirectory(const QString &directory, QString *topLevel
return !topLevelFound.isEmpty();
}
bool BazaarControl::managesFile(const QString &workingDirectory, const QString &fileName) const
{
return m_bazaarClient->managesFile(workingDirectory, fileName);
}
bool BazaarControl::isConfigured() const
{
const QString binary = m_bazaarClient->settings()->binaryPath();

View File

@@ -53,6 +53,7 @@ public:
Core::Id id() const;
bool managesDirectory(const QString &filename, QString *topLevel = 0) const;
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
bool isConfigured() const;
bool supportsOperation(Operation operation) const;
bool vcsOpen(const QString &fileName);

View File

@@ -647,7 +647,7 @@ bool BazaarPlugin::submitEditorAboutToClose()
Core::IDocument *editorDocument = commitEditor->document();
QTC_ASSERT(editorDocument, return true);
bool dummyPrompt = m_bazaarSettings.boolValue(BazaarSettings::promptOnSubmitKey);
bool dummyPrompt = false;
const VcsBase::VcsBaseSubmitEditor::PromptSubmitResult response =
commitEditor->promptSubmit(tr("Close Commit Editor"), tr("Do you want to commit the changes?"),
tr("Message check failed. Do you want to proceed?"),

View File

@@ -118,7 +118,7 @@ protected:
bool submitEditorAboutToClose();
private:
// Methods
// Functions
void createMenu();
void createSubmitEditorActions();
void createFileActions(const Core::Context &context);

View File

@@ -54,7 +54,6 @@ BazaarSettings OptionsPageWidget::settings() const
s.setValue(BazaarSettings::userEmailKey, m_ui.defaultEmailLineEdit->text().trimmed());
s.setValue(BazaarSettings::logCountKey, m_ui.logEntriesCount->value());
s.setValue(BazaarSettings::timeoutKey, m_ui.timeout->value());
s.setValue(BazaarSettings::promptOnSubmitKey, m_ui.promptOnSubmitCheckBox->isChecked());
return s;
}
@@ -65,7 +64,6 @@ void OptionsPageWidget::setSettings(const BazaarSettings &s)
m_ui.defaultEmailLineEdit->setText(s.stringValue(BazaarSettings::userEmailKey));
m_ui.logEntriesCount->setValue(s.intValue(BazaarSettings::logCountKey));
m_ui.timeout->setValue(s.intValue(BazaarSettings::timeoutKey));
m_ui.promptOnSubmitCheckBox->setChecked(s.boolValue(BazaarSettings::promptOnSubmitKey));
}
QString OptionsPageWidget::searchKeywords() const
@@ -81,7 +79,6 @@ QString OptionsPageWidget::searchKeywords() const
<< sep << m_ui.miscGroupBox->title()
<< sep << m_ui.showLogEntriesLabel->text()
<< sep << m_ui.timeoutSecondsLabel->text()
<< sep << m_ui.promptOnSubmitCheckBox->text()
;
rc.remove(QLatin1Char('&'));
return rc;

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>649</width>
<height>337</height>
<height>268</height>
</rect>
</property>
<property name="windowTitle">
@@ -132,16 +132,6 @@
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="promptOnSubmitCheckBox">
<property name="text">
<string>Prompt on submit</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@@ -52,7 +52,7 @@ namespace Internal {
\class NavigationWidgetPrivate
The NavigationWidgetPrivate class provides internal data structures and
methods for NavigationWidget.
functions for NavigationWidget.
*/
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
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)

View File

@@ -134,6 +134,11 @@ bool ClearCaseControl::managesDirectory(const QString &directory, QString *topLe
return m_plugin->managesDirectory(directory, topLevel);
}
bool ClearCaseControl::managesFile(const QString &workingDirectory, const QString &fileName) const
{
return m_plugin->managesFile(workingDirectory, fileName);
}
bool ClearCaseControl::vcsAnnotate(const QString &file, int line)
{
const QFileInfo fi(file);

View File

@@ -48,6 +48,7 @@ public:
Core::Id id() const;
bool managesDirectory(const QString &directory, QString *topLevel = 0) const;
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
bool isConfigured() const;

View File

@@ -612,10 +612,10 @@ void ClearCasePlugin::diffCheckInFiles(const QStringList &files)
ccDiffWithPred(m_checkInView, files);
}
static inline void setDiffBaseDirectory(IEditor *editor, const QString &db)
static inline void setWorkingDirectory(IEditor *editor, const QString &wd)
{
if (VcsBase::VcsBaseEditorWidget *ve = qobject_cast<VcsBase::VcsBaseEditorWidget*>(editor->widget()))
ve->setDiffBaseDirectory(db);
ve->setWorkingDirectory(wd);
}
//! retrieve full location of predecessor of \a version
@@ -934,14 +934,14 @@ void ClearCasePlugin::ccDiffWithPred(const QString &workingDir, const QStringLis
if (IEditor *existingEditor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) {
existingEditor->document()->setContents(result.toUtf8());
EditorManager::activateEditor(existingEditor);
setDiffBaseDirectory(existingEditor, workingDir);
setWorkingDirectory(existingEditor, workingDir);
return;
}
diffname = QDir::toNativeSeparators(files.first());
}
const QString title = QString::fromLatin1("cc diff %1").arg(diffname);
IEditor *editor = showOutputInEditor(title, result, VcsBase::DiffOutput, source, codec);
setDiffBaseDirectory(editor, workingDir);
setWorkingDirectory(editor, workingDir);
VcsBase::VcsBaseEditorWidget::tagEditor(editor, tag);
ClearCaseEditor *diffEditorWidget = qobject_cast<ClearCaseEditor *>(editor->widget());
QTC_ASSERT(diffEditorWidget, return);
@@ -1037,7 +1037,7 @@ void ClearCasePlugin::diffActivity()
m_diffPrefix.clear();
const QString title = QString::fromLatin1("%1.patch").arg(activity);
IEditor *editor = showOutputInEditor(title, result, VcsBase::DiffOutput, activity, 0);
setDiffBaseDirectory(editor, topLevel);
setWorkingDirectory(editor, topLevel);
}
void ClearCasePlugin::diffCurrentFile()
@@ -1253,12 +1253,12 @@ void ClearCasePlugin::annotateCurrentFile()
vcsAnnotate(state.currentFileTopLevel(), state.relativeCurrentFile());
}
void ClearCasePlugin::annotateVersion(const QString &file,
const QString &revision,
int lineNr)
void ClearCasePlugin::annotateVersion(const QString &workingDirectory,
const QString &file,
const QString &revision,
int lineNr)
{
const QFileInfo fi(file);
vcsAnnotate(fi.absolutePath(), fi.fileName(), revision, lineNr);
vcsAnnotate(workingDirectory, file, revision, lineNr);
}
void ClearCasePlugin::vcsAnnotate(const QString &workingDir, const QString &file,
@@ -1402,8 +1402,8 @@ IEditor *ClearCasePlugin::showOutputInEditor(const QString& title, const QString
<< "Size= " << output.size() << " Type=" << editorType << debugCodec(codec);
QString s = title;
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,int)));
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
this, SLOT(annotateVersion(QString,QString,QString,int)));
ClearCaseEditor *e = qobject_cast<ClearCaseEditor*>(editor->widget());
if (!e)
return 0;
@@ -1850,6 +1850,13 @@ bool ClearCasePlugin::ccCheckUcm(const QString &viewname, const QString &working
return QRegExp(QLatin1String("(^|\\n)ucm\\n")).indexIn(catcsData) != -1;
}
bool ClearCasePlugin::managesFile(const QString &workingDirectory, const QString &fileName) const
{
QStringList args;
args << QLatin1String("ls") << fileName;
return runCleartoolSync(workingDirectory, args).contains(QLatin1String("@@"));
}
ViewData ClearCasePlugin::ccGetView(const QString &workingDir) const
{
static QHash<QString, ViewData> viewCache;

View File

@@ -166,6 +166,7 @@ public:
void setStatus(const QString &file, FileStatus::Status status, bool update = true);
bool ccCheckUcm(const QString &viewname, const QString &workingDir) const;
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
public slots:
void vcsAnnotate(const QString &workingDir, const QString &file,
@@ -185,7 +186,7 @@ private slots:
void startCheckInCurrentFile();
void historyCurrentFile();
void annotateCurrentFile();
void annotateVersion(const QString &file, const QString &revision, int lineNumber);
void annotateVersion(const QString &workingDirectory, const QString &file, const QString &revision, int lineNumber);
void describe(const QString &source, const QString &changeNr);
void viewStatus();
void checkInSelected();

View File

@@ -208,7 +208,7 @@ QString CMakeManager::findCbpFile(const QDir &directory)
{
// Find the cbp 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
QDateTime t;
QString file;

View File

@@ -54,7 +54,7 @@ using namespace Core::Internal;
You don't create instances of this class directly, but instead use the
\l{ActionManager::createMenu()}
and \l{ActionManager::createMenuBar()} methods.
and \l{ActionManager::createMenuBar()} functions.
Retrieve existing action containers for an ID with
\l{ActionManager::actionContainer()}.

View File

@@ -59,8 +59,8 @@ using namespace Core::Internal;
menu items and keyboard shortcuts.
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,
e.g. for connecting to signals, is its ActionManager::instance() method.
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() function.
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
@@ -92,7 +92,7 @@ using namespace Core::Internal;
\section1 Registering Actions
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
QAction *myAction = new QAction(tr("My Action"), this);
Core::Command *cmd = Core::ActionManager::registerAction(myAction,
@@ -113,7 +113,7 @@ using namespace Core::Internal;
Also use the ActionManager to add items to registered
action containers like the applications menu bar or menus in that menu bar.
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
actionContainer(const Id&) and add your command to this container.
@@ -126,7 +126,7 @@ using namespace Core::Internal;
\list
\li Always register your actions and shortcuts!
\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.
\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.
@@ -176,7 +176,7 @@ ActionManager *ActionManager::instance()
or to add menu items to the menu. The ActionManager owns
the returned ActionContainer.
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)
{

View File

@@ -162,13 +162,13 @@ void WizardEventLoop::rejected()
\brief The BaseFileWizard class implements a generic wizard for
creating files.
The following abstract methods must be implemented:
The following abstract functions must be implemented:
\list
\li createWizardDialog(): Called to create the QWizard dialog to be shown.
\li generateFiles(): Generates file content.
\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.
\sa Core::GeneratedFile, Core::BaseFileWizardParameters, Core::StandardFileWizard

View File

@@ -51,7 +51,7 @@
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
plugin manager's object pool in your plugin's initialize method:
plugin manager's object pool in your plugin's initialize function:
\code
bool MyPlugin::initialize(const QStringList &arguments, QString *errorString)
{
@@ -133,7 +133,7 @@
const QString &platform,
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.
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

View File

@@ -81,7 +81,7 @@
as expected. On expected file changes all IDocument objects are notified to reload
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
of FileInterfaces as an argument, and return the list of files which were
_not_ saved.
@@ -517,7 +517,7 @@ void DocumentManager::expectFileChange(const QString &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)
{
if (fileName.isEmpty())

View File

@@ -84,7 +84,7 @@ public:
static void setCurrentFile(const QString &filePath);
static QString currentFile();
// helper methods
// helper functions
static QString fixFileName(const QString &fileName, FixMode fixmode);
static bool saveDocument(IDocument *document, const QString &fileName = QString(), bool *isReadOnly = 0);

View File

@@ -87,7 +87,7 @@ public:
QList<IEditor *> editorsForDocuments(const QList<IDocument *> &documents) 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 addRestoredDocument(const QString &fileName, const QString &displayName, const Id &id);
Entry *firstRestoredDocument() const;

Some files were not shown because too many files have changed in this diff Show More