Merge remote-tracking branch 'origin/3.5'

Change-Id: I9baaf42531c10c32a2fa78d2504de213e77fdf82
This commit is contained in:
Eike Ziller
2015-08-10 11:15:29 +02:00
20 changed files with 69 additions and 101 deletions

View File

@@ -29,7 +29,6 @@ indexes += $QDOC_INDEX_DIR/qtwidgets/qtwidgets.index \
$QDOC_INDEX_DIR/qtsensors/qtsensors.index \ $QDOC_INDEX_DIR/qtsensors/qtsensors.index \
$QDOC_INDEX_DIR/qttestlib/qttestlib.index \ $QDOC_INDEX_DIR/qttestlib/qttestlib.index \
$QDOC_INDEX_DIR/qtuitools/qtuitools.index \ $QDOC_INDEX_DIR/qtuitools/qtuitools.index \
$QDOC_INDEX_DIR/qtwebkit/qtwebkit.index \
$QDOC_INDEX_DIR/qtxml/qtxml.index $QDOC_INDEX_DIR/qtxml/qtxml.index
include(macros.qdocconf) include(macros.qdocconf)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -121,8 +121,8 @@
\endlist \endlist
The Gradle wrappers and scripts are bundled only if you use Gradle, which is The Gradle wrappers and scripts are bundled only if you use
the default. To use Ant instead, deselect the \uicontrol {Use Gradle} check box. \l{Selecting the APK Build Tool}{Gradle} to build the application packages.
To view the packages that the \c androiddeployqt tool created, select the To view the packages that the \c androiddeployqt tool created, select the
\uicontrol {Open package location after build} check box. \uicontrol {Open package location after build} check box.

View File

@@ -111,8 +111,7 @@
parameters. parameters.
\note Starting a C++ program in the debugger can take a long time, typically \note Starting a C++ program in the debugger can take a long time, typically
in the range of several seconds to minutes if complex features (like in the range of several seconds to minutes if complex features are used.
QtWebKit) are used.
\section1 Launching the Debugger in Different Modes \section1 Launching the Debugger in Different Modes

View File

@@ -96,35 +96,30 @@
\list 1 \list 1
\li To build the Clang code model plugin, you must acquire Clang and \li Acquire Clang 3.6.0 or higher in one of the following ways:
LLVM in one of the following ways:
\list \list
\li Build optimized versions of LLVM and Clang, as instructed in \li Use the package manager of your system.
\l{http://clang.llvm.org/get_started.html}
{Getting Started: Building and Running Clang}.
The instructions describe how to build debug versions. To
build optimized versions, enter the following command
instead of just \c make:
\c{make ENABLE_OPTIMIZED=1}
For information about Git mirrors, see
\l{http://llvm.org/docs/GettingStarted.html#git-mirror}
{Git Mirror}.
Install the built versions by entering the following
command:
\c{make install}
\li Download and install LLVM from the \li Download and install LLVM from the
\l{http://llvm.org/releases/}{LLVM Download Page} or \l{http://llvm.org/releases/}{LLVM Download Page} or
\l{http://llvm.org/builds/}{LLVM Snapshot Builds}. \l{http://llvm.org/builds/}{LLVM Snapshot Builds}.
\li Use the package manager of your system. \li Build Clang by following
\l{http://clang.llvm.org/get_started.html}
{Getting Started: Building and Running Clang}.
Add the following options to the \c cmake call in order to
build an optimized version and to specify the installation
directory:
\c -DCMAKE_BUILD_TYPE=Release
\c -DCMAKE_INSTALL_PREFIX=/your/install/dir
After building, install with
\c {make install}
\endlist \endlist
@@ -132,26 +127,7 @@
of LLVM either as part of the build environment or pass it directly of LLVM either as part of the build environment or pass it directly
to qmake when you build \QC. to qmake when you build \QC.
The following are examples of the LLVM_INSTALL_DIR values to use \li Rerun \c qmake and build \QC.
depending on the installation method:
\list
\li Installed via package manager on Linux:
\c {LLVM_INSTALL_DIR=/usr/lib/llvm-3.6}
\li Manually built on Unix in release mode:
\c {LLVM_INSTALL_DIR=$HOME/llvm-build/Release+Asserts}
\li Installed from a snapshot on Windows:
\c {LLVM_INSTALL_DIR=C:\llvm}
\endlist
\li Rebuild \QC.
\endlist \endlist

View File

@@ -177,14 +177,13 @@
\QC validates instances of JSON entities against \QC validates instances of JSON entities against
\l{http://tools.ietf.org/html/draft-zyp-json-schema-03} \l{http://tools.ietf.org/html/draft-zyp-json-schema-03}
{A JSON Media Type for Describing the Structure and Meaning of JSON Documents}. {A JSON Media Type for Describing the Structure and Meaning of JSON Documents}.
However, this feature is still under development, and \QC does not yet However, \QC does not understand the entire specification.
understand the entire specification.
A JSON schema defines the structure of JSON data. It determines what JSON A JSON schema defines the structure of JSON data. It determines what JSON
data is required for an application and how to interact with it. data is required for an application and how to interact with it.
The specification does not define how to map JSON instances with JSON The specification does not define how to map JSON instances with JSON
schemas. As a temporary solution, \QC looks for a JSON schema file with a schemas. \QC looks for a JSON schema file with a
name that matches the name of the JSON instance file in the user name that matches the name of the JSON instance file in the user
configuration folder. For example, \c {~/config/QtProject/qtcreator/json} on configuration folder. For example, \c {~/config/QtProject/qtcreator/json} on
Linux and OS X and Linux and OS X and
@@ -203,8 +202,7 @@
\section1 List of JavaScript and QML Checks \section1 List of JavaScript and QML Checks
Many of the JavaScript checks are similar to the ones in Douglas Crockford's Many of the JavaScript checks are similar to the ones in Douglas Crockford's
JSLint tool and are explained well on \l{http://www.jslint.com}{JSLint} tool.
\l{http://www.jslint.com/lint.html}{the JSLint website}.
\table \table
\header \header
@@ -1053,13 +1051,14 @@
For example, you might ask colleagues to review a change that you plan to For example, you might ask colleagues to review a change that you plan to
submit to a version control system. If you use the Git version control submit to a version control system. If you use the Git version control
system, you can create a \e{diff} view by selecting \uicontrol Tools > system, you can create a \e{diff} view by selecting \uicontrol Tools >
\uicontrol Git > \uicontrol {Diff Repository}. You can then upload its \uicontrol Git > \uicontrol {Local Repository} > \uicontrol Diff. You can
contents to the server by choosing \uicontrol Tools > then upload its contents to the server by selecting \uicontrol Tools >
\uicontrol {Code Pasting} > \uicontrol {Paste Snippet}. The reviewers can \uicontrol {Code Pasting} > \uicontrol {Paste Snippet}. The reviewers can
retrieve the code snippet by selecting \uicontrol Tools > retrieve the code snippet by selecting \uicontrol Tools >
\uicontrol {Code Pasting} > \uicontrol {Fetch Snippet}. If they have the \uicontrol {Code Pasting} > \uicontrol {Fetch Snippet}. If they have the
project currently opened in \QC, they can apply and test the change by project currently opened in \QC, they can apply and test the change by
choosing \uicontrol Tools > \uicontrol Git > \uicontrol {Apply Patch}. choosing \uicontrol Tools > \uicontrol Git > \uicontrol {Patch} >
\uicontrol {Apply from Editor}.
*/ */

View File

@@ -117,11 +117,8 @@
\endlist \endlist
\li Select \uicontrol Run to specify run settings. \li Select \uicontrol Run to specify run settings. Usually, you can use
the default settings.
\image qtcreator-run-settings-linux-devices.png "Run settings for embedded Linux devices"
Usually, you can use the default settings.
When you run the project, \QC deploys the application as specified by the When you run the project, \QC deploys the application as specified by the
deploy steps. By default, \QC copies the application files to the device. deploy steps. By default, \QC copies the application files to the device.

View File

@@ -1,9 +1,4 @@
Qt Creator custom wizards are located in this directory. Qt Creator custom wizards are located in this directory.
The subdirectories 'helloworld', 'listmodel' and 'scriptgeneratedproject'
are provided as examples.
To see how they work in Qt Creator, rename the 'wizard_sample.xml' files
to 'wizard.xml'.
The command line option -customwizard-verbose can be used to obtain The command line option -customwizard-verbose can be used to obtain
verbose information while loading the custom wizards. verbose information while loading the custom wizards.

View File

@@ -53,7 +53,7 @@ public:
void remove(QObject *component); void remove(QObject *component);
template <typename T> T *component() { template <typename T> T *component() {
QReadLocker(&lock()); QReadLocker locker(&lock());
foreach (QObject *component, m_components) { foreach (QObject *component, m_components) {
if (T *result = qobject_cast<T *>(component)) if (T *result = qobject_cast<T *>(component))
return result; return result;
@@ -62,7 +62,7 @@ public:
} }
template <typename T> QList<T *> components() { template <typename T> QList<T *> components() {
QReadLocker(&lock()); QReadLocker locker(&lock());
QList<T *> results; QList<T *> results;
foreach (QObject *component, m_components) { foreach (QObject *component, m_components) {
if (T *result = qobject_cast<T *>(component)) { if (T *result = qobject_cast<T *>(component)) {
@@ -101,7 +101,7 @@ template <typename T> T *query(QObject *obj)
return (T *)0; return (T *)0;
T *result = qobject_cast<T *>(obj); T *result = qobject_cast<T *>(obj);
if (!result) { if (!result) {
QReadLocker(&lock()); QReadLocker locker(&Aggregate::lock());
Aggregate *parentAggregation = Aggregate::parentAggregate(obj); Aggregate *parentAggregation = Aggregate::parentAggregate(obj);
result = (parentAggregation ? query<T>(parentAggregation) : 0); result = (parentAggregation ? query<T>(parentAggregation) : 0);
} }
@@ -120,7 +120,7 @@ template <typename T> QList<T *> query_all(QObject *obj)
{ {
if (!obj) if (!obj)
return QList<T *>(); return QList<T *>();
QReadLocker(&lock()); QReadLocker locker(&Aggregate::lock());
Aggregate *parentAggregation = Aggregate::parentAggregate(obj); Aggregate *parentAggregation = Aggregate::parentAggregate(obj);
QList<T *> results; QList<T *> results;
if (parentAggregation) if (parentAggregation)

View File

@@ -245,7 +245,7 @@ void IpcCommunicator::initializeBackend()
qCDebug(log) << "Starting" << clangBackEndProcessPath; qCDebug(log) << "Starting" << clangBackEndProcessPath;
QTC_ASSERT(QFileInfo(clangBackEndProcessPath).exists(), return); QTC_ASSERT(QFileInfo(clangBackEndProcessPath).exists(), return);
m_connection.setProcessAliveTimerInterval(10 * 1000); m_connection.setProcessAliveTimerInterval(30 * 1000);
m_connection.setProcessPath(clangBackEndProcessPath); m_connection.setProcessPath(clangBackEndProcessPath);
connect(&m_connection, &ConnectionClient::processRestarted, connect(&m_connection, &ConnectionClient::processRestarted,

View File

@@ -134,10 +134,12 @@ static void appendDiagnostic(const CXDiagnostic &diag,
static bool isBlackListedDiagnostic(const Utils::MimeType &mimeType, const QString &diagnostic) static bool isBlackListedDiagnostic(const Utils::MimeType &mimeType, const QString &diagnostic)
{ {
static QString pragmaOnceInMainFile = QLatin1String("#pragma once in main file"); static const QStringList blackList {
QLatin1String("#pragma once in main file"),
QLatin1String("#include_next in primary source file")
};
return diagnostic == pragmaOnceInMainFile return mimeType.inherits(QLatin1String("text/x-chdr")) && blackList.contains(diagnostic);
&& mimeType.inherits(QLatin1String("text/x-chdr"));
} }
QList<Diagnostic> SemanticMarker::diagnostics() const QList<Diagnostic> SemanticMarker::diagnostics() const

View File

@@ -107,18 +107,6 @@ public:
| TextEditorActionHandler::FollowSymbolUnderCursor); | TextEditorActionHandler::FollowSymbolUnderCursor);
addHoverHandler(new CppHoverHandler); addHoverHandler(new CppHoverHandler);
if (!HostOsInfo::isMacHost() && !HostOsInfo::isWindowsHost()) {
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppSource, QLatin1String(":/cppeditor/images/qt_cpp.png"))),
Constants::CPP_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCSource, QLatin1String(":/cppeditor/images/qt_c.png"))),
Constants::C_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppHeader, QLatin1String(":/cppeditor/images/qt_h.png"))),
Constants::CPP_HEADER_MIMETYPE);
}
} }
}; };
@@ -280,6 +268,17 @@ bool CppEditorPlugin::initialize(const QStringList & /*arguments*/, QString *err
void CppEditorPlugin::extensionsInitialized() void CppEditorPlugin::extensionsInitialized()
{ {
if (!HostOsInfo::isMacHost() && !HostOsInfo::isWindowsHost()) {
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppSource, QLatin1String(":/cppeditor/images/qt_cpp.png"))),
Constants::CPP_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCSource, QLatin1String(":/cppeditor/images/qt_c.png"))),
Constants::C_SOURCE_MIMETYPE);
FileIconProvider::registerIconOverlayForMimeType(
QIcon(creatorTheme()->imageFile(Theme::IconOverlayCppHeader, QLatin1String(":/cppeditor/images/qt_h.png"))),
Constants::CPP_HEADER_MIMETYPE);
}
} }
ExtensionSystem::IPlugin::ShutdownFlag CppEditorPlugin::aboutToShutdown() ExtensionSystem::IPlugin::ShutdownFlag CppEditorPlugin::aboutToShutdown()

View File

@@ -186,7 +186,7 @@ QStringList BaseController::addConfigurationArguments(const QStringList &args) c
QStringList realArgs; QStringList realArgs;
realArgs << args.at(0); realArgs << args.at(0);
realArgs << QLatin1String("-m"); // show diff agains parents instead of merge commits realArgs << QLatin1String("-m"); // show diff against parents instead of merge commits
realArgs << QLatin1String("-M") << QLatin1String("-C"); // Detect renames and copies realArgs << QLatin1String("-M") << QLatin1String("-C"); // Detect renames and copies
realArgs << QLatin1String("--first-parent"); // show only first parent realArgs << QLatin1String("--first-parent"); // show only first parent
if (ignoreWhitespace()) if (ignoreWhitespace())

View File

@@ -2532,7 +2532,7 @@ void TextEditorWidget::doSetTextCursor(const QTextCursor &cursor)
void TextEditorWidget::gotoLine(int line, int column, bool centerLine) void TextEditorWidget::gotoLine(int line, int column, bool centerLine)
{ {
d->m_lastCursorChangeWasInteresting = false; // avoid adding the previous position to history d->m_lastCursorChangeWasInteresting = false; // avoid adding the previous position to history
const int blockNumber = line - 1; const int blockNumber = qMin(line, document()->blockCount()) - 1;
const QTextBlock &block = document()->findBlockByNumber(blockNumber); const QTextBlock &block = document()->findBlockByNumber(blockNumber);
if (block.isValid()) { if (block.isValid()) {
QTextCursor cursor(block); QTextCursor cursor(block);

View File

@@ -896,6 +896,8 @@ void IosTool::stopRelayServers(int errorCode)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
//This keeps iostool from stealing focus
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
// We do not pass the real arguments to QCoreApplication because this wrapper needs to be able // We do not pass the real arguments to QCoreApplication because this wrapper needs to be able
// to forward arguments like -qmljsdebugger=... that are filtered by QCoreApplication // to forward arguments like -qmljsdebugger=... that are filtered by QCoreApplication
QStringList args; QStringList args;

View File

@@ -61,25 +61,25 @@ def main():
type(editorWidget, "<Meta+Space>") type(editorWidget, "<Meta+Space>")
else: else:
type(editorWidget, "<Ctrl+Space>") type(editorWidget, "<Ctrl+Space>")
type(waitForObject(":popupFrame_Proposal_QListView"), "<Down>")
if current == "Clang":
# different order with Clang code model
type(waitForObject(":popupFrame_Proposal_QListView"), "<Down>")
listView = waitForObject(":popupFrame_Proposal_QListView") listView = waitForObject(":popupFrame_Proposal_QListView")
test.compare("class derived from QObject", str(listView.model().data(listView.currentIndex())), shownProposals = dumpItems(listView.model())
"Verifying selecting the correct entry.") usedProposal = "class derived from QObject"
type(waitForObject(":popupFrame_Proposal_QListView"), "<Return>") expectedProposals = ["class", "class ", "class template",
test.verify(str(editorWidget.plainText).startswith("class name : public QObject"), usedProposal, "class derived from QWidget"]
"Steps 3&4: Verifying if: The list of suggestions is opened. It is " test.compare(len(shownProposals), len(expectedProposals), "Number of proposed templates")
"possible to select one of the suggestions. Code with several " test.compare(set(shownProposals), set(expectedProposals),
"variables is inserted.") "Expected proposals shown, ignoring order?")
doubleClickItem(listView, usedProposal, 5, 5, 0, Qt.LeftButton)
pattern = ("(?<=class)\s+name\s*:\s*public\s+QObject\s*\{\s*Q_OBJECT\s+"
"public:\s+name\(\)\s*\{\}\s+virtual\s+~name\(\)\s*\{\}\s+\};")
test.verify(re.search(pattern, str(editorWidget.plainText)),
"Code with several variables is inserted?")
# Step 5: Press Tab to move between the variables and specify values for them. For example write "Myname" for variable "name". # Step 5: Press Tab to move between the variables and specify values for them. For example write "Myname" for variable "name".
type(editorWidget, "<Tab>") type(editorWidget, "<Tab>")
type(editorWidget, "<Tab>") type(editorWidget, "<Tab>")
type(editorWidget, "<Tab>") type(editorWidget, "<Tab>")
type(editorWidget, "Myname") type(editorWidget, "Myname")
pattern = "(?<=class)\s+Myname\s*:\s*public\s+QObject\s*\{\s*Q_OBJECT\s+public:\s+Myname\(\)\s*\{\}\s+virtual\s+~Myname\(\)\s*\{\}\s+\};" result = re.search(pattern.replace("name", "Myname"), str(editorWidget.plainText))
result = re.search(pattern, str(editorWidget.plainText))
if result: if result:
test.passes("Step 5: Verifying if: A value for a variable is inserted and all " test.passes("Step 5: Verifying if: A value for a variable is inserted and all "
"instances of the variable within the snippet are renamed.") "instances of the variable within the snippet are renamed.")

Binary file not shown.