Merge remote branch 'origin/2.0'

Conflicts:
	doc/qt-html-templates.qdocconf
	src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
	src/plugins/qmljseditor/qmljscodecompletion.cpp
This commit is contained in:
con
2010-06-18 16:54:37 +02:00
36 changed files with 430 additions and 181 deletions

7
dist/changes-2.0.0 vendored
View File

@@ -17,7 +17,7 @@ General
of Qt creator
* Added option to set interface language explicitly, overriding the locale
setting
* New "Design" mode for visual editors (.ui & .qml files)
* New "Design" mode for visual editors
* Fixed crash when working with empty pro-file
* Ask for close, save, or save as when file is removed while open in Qt Creator
* Use shadowbuilding by default in new projects whenever possible
@@ -94,11 +94,6 @@ QML/JS Support
* New qml based .qmlproject file format (replaces old format)
* New QmlDesigner
* Allows visual manipulation of .qml files
* Supports changing top-level states
* Integrates tighly with text editor, e.g. shared history, navigation facilities ...
Platform Specific
Mac

35
dist/changes-2.1.0 vendored Normal file
View File

@@ -0,0 +1,35 @@
The QtCreator 2.1 release contains bug fixes and new features.
Below is a list of relevant changes. You can find a complete list of changes
within the logs of Qt Creator's sources. Simply check it out from the public git
repository e.g.,
git clone git://gitorious.org/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v2.0.0...v2.1.0
General
Editing
C++ Support
Project support
Debugging
QML/JS Support
* New QmlDesigner
* Allows visual manipulation of .qml files
* Supports changing top-level states
* Integrates tighly with text editor, e.g. shared history, navigation facilities ...
Platform Specific
Mac
Linux (GNOME and KDE)
Windows
Additional credits go to:

View File

@@ -15,10 +15,20 @@ equals(QMAKE_DIR_SEP, /) { # unix, mingw+msys
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
QCH_FILE = $$IDE_DOC_PATH/qtcreator.qch
HELP_DEP_FILES = $$PWD/qtcreator.qdoc \
$$PWD/addressbook-sdk.qdoc \
$$PWD/qt-defines.qdocconf \
$$PWD/qt-html-templates.qdocconf \
$$PWD/qtcreator.qdocconf \
$$PWD/qtcreator-online.qdocconf
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf
html_docs.depends += $$HELP_DEP_FILES
html_docs.files = $$QHP_FILE
html_docs_online.commands = $$QDOC $$PWD/qtcreator-online.qdocconf
html_docs_online.depends += $$HELP_DEP_FILES
qch_docs.commands = $$HELPGENERATOR -o \"$$QCH_FILE\" $$QHP_FILE
qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE
@@ -29,10 +39,10 @@ unix:!macx {
INSTALLS += qch_docs
}
docs_online.depends = html_docs_online
docs.depends = qch_docs
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
QMAKE_EXTRA_TARGETS += html_docs html_docs_online qch_docs docs docs_online
OTHER_FILES = $$PWD/qtcreator.qdoc \
$$PWD/qtcreator.qdocconf
OTHER_FILES += $$PWD/api/qtcreator-api.qdoc \
$$PWD/api/qtcreator-api.qdocconf
OTHER_FILES = $$HELP_DEP_FILES \
$$PWD/api/qtcreator-api.qdoc \
$$PWD/api/qtcreator-api.qdocconf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -20,53 +20,46 @@ codeindent = 1
# See also qhp.Qt.extraFiles
extraimages.HTML = qt-logo \
trolltech-logo \
api_examples.png \
bg_ll.png \
bg_ul_blank.png \
bullet_gt.png \
horBar.png \
qt_ref_doc.png \
api_lookup.png \
bg_ll_blank.png \
bg_ur.png \
bullet_sq.png \
bullet_dn.png \
bullet_up.png \
page_bg.png \
qt_tools.png \
api_topics.png \
bg_lr.png \
bg_ur_blank.png \
content_bg.png \
print.png \
sep.png \
bg_l.png \
bg_r.png \
box_bg.png \
feedbackground.png \
qt_guide.png \
sprites-combined.png \
bg_l_blank.png \
bg_ul.png \
breadcrumb.png \
form_bg.png \
qt_icon.png \
header.png \
qtcreator-screenshots.png \
taskmenuextension-example.png \
coloreditorfactoryimage.png \
dynamiclayouts-example.png \
stylesheet-coffee-plastique.png
api_examples.png \
api_lookup.png \
arrow_down.png \
bg_ll.png \
bg_l.png \
bg_lr.png \
bg_r.png \
bg_ul_blank.png \
bg_ll_blank.png \
bg_l_blank.png \
breadcrumb.png \
bullet_dn.png \
bullet_gt.png \
bullet_sq.png \
box_bg.png \
feedbackground.png \
horBar.png \
page_bg.png \
sprites-combined.png \
qtcreator-screenshots.png
# This stuff is used by the new doc format.
scriptdirs = $SRCDIR/templates/scripts
styledirs = $SRCDIR/templates/style
scripts.HTML = functions.js \
shBrushCpp.js \
shCore.js \
shLegacy.js \
narrow.js \
superfish.js \
jquery.js
styles.HTML = OfflineStyle.css \
style.css \
style_ie6.css \
style_ie7.css \
style_ie8.css
styles.HTML = style.css \
shCore.css \
shThemeDefault.css \
narrow.css \
superfish.css \
superfish_skin.css \
OfflineStyle.css \
style_ie6.css \
style_ie7.css \
style_ie8.css

View File

@@ -1,8 +1,19 @@
HTML.stylesheets = style/style.css
HTML.stylesheets = style/style.css \
style/OfflineStyle.css \
style/style_ie7.css \
style/style_ie8.css \
style/style_ie6.css
HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div class=\"content\"> \n" \
" <div id=\"nav-logo\">\n" \
" <a href=\"index.html\">Home</a></div>\n" \
" <a href=\"index.html\" class=\"qtref\"><span>Qt Creator Documentation</span></a>\n" \
" <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
" <fieldset>\n" \
" <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
" </fieldset>\n" \
" </form></div>\n" \
" <div id=\"nav-topright\">\n" \
" <ul>\n" \
" <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \
@@ -17,9 +28,10 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div id=\"shortCut\">\n" \
" <ul>\n" \
" <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt Creator 2.1.80 </a></span></li>\n" \
" <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL Versions" \
" <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
" </a></li>\n" \
" </ul>\n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"wrapper\">\n" \
@@ -31,55 +43,49 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div class=\"searchlabel\">\n" \
" Search index:</div>\n" \
" <div class=\"search\">\n" \
" <form id=\"qtdocsearch\" action=\"#\">\n" \
" <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
" <fieldset>\n" \
" <input type=\"text\" name=\"searchstring\" id=\"searchstring\" value=\"\" onkeyup=\"doSearch(this.value);\" />\n" \
" <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
" </fieldset>\n" \
" </form>\n" \
" </div>\n" \
" <div class=\"box first bottombar\" id=\"lookup\">\n" \
" <h2>\n" \
" <h2 title=\"API Lookup\"><span></span>\n" \
" API Lookup</h2>\n" \
" <div class=\"list\">\n" \
" <ul>\n" \
" <li><a href=\"modules.html\">All modules</a></li>\n" \
" <li><a href=\"classes.html\">All classes</a></li>\n" \
" <li><a href=\"functions.html\">All functions</a></li>\n" \
" <li><a href=\"namespaces.html\">All namespaces</a></li>\n" \
" <li><a href=\"platform-specific.html\">Platform specifics</a></li>\n" \
" </ul>\n" \
" </div>\n" \
" <div class=\"live\">\n" \
" <div id=\"list001\" class=\"list\">\n" \
" <ul id=\"ul001\" >\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/classes.html\">Class index</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/functions.html\">Function index</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/modules.html\">Modules</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/namespaces.html\">Namespaces</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/qtglobal.html\">Global stuff</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/qdeclarativeelements.html\">QML elements</a></li>\n" \
" </ul> \n" \
" </div>\n" \
" </div>\n" \
" <div class=\"box bottombar\" id=\"topics\">\n" \
" <h2>\n" \
" API Topics</h2>\n" \
" <div class=\"list\">\n" \
" <ul>\n" \
" <li><a href=\"object.html\">QObject model</a></li>\n" \
" <li><a href=\"eventsandfilters.html\">Events, signals &amp; slots</a></li>\n" \
" <li><a href=\"paintsystem.html\">Graphics &amp; Paint system</a></li>\n" \
" <li><a href=\"declarativeui.html\">Qt Quick</a></li>\n" \
" <li><a href=\"widgets-and-layouts.html\">Widget style &amp; layout</a></li>\n" \
" </ul>\n" \
" </div>\n" \
" <div class=\"live\">\n" \
" <h2 title=\"Qt Topics\"><span></span>\n" \
" Qt Topics</h2>\n" \
" <div id=\"list002\" class=\"list\">\n" \
" <ul id=\"ul002\" >\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/platform-specific.html\">Platform-specific info</a></li>\n" \
" </ul> \n" \
" </div>\n" \
" </div>\n" \
" <div class=\"box\" id=\"examples\">\n" \
" <h2>\n" \
" API Examples</h2>\n" \
" <div class=\"list\">\n" \
" <ul>\n" \
" <li><a href=\"examples.html\">All examples</a></li>\n" \
" <li><a href=\"tutorials.html\">All tutorials</a></li>\n" \
" <li><a href=\"examples.html\">Qt Quick examples</a></li>\n" \
" <li><a href=\"examples.html\">Desktop examples</a></li>\n" \
" <li><a href=\"examples.html\">Device examples</a></li>\n" \
" </ul>\n" \
" </div>\n" \
" <div class=\"live\">\n" \
" <h2 title=\"Examples\"><span></span>\n" \
" Examples</h2>\n" \
" <div id=\"list003\" class=\"list\">\n" \
" <ul id=\"ul003\">\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/all-examples.html\">Examples</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/tutorials.html\">Tutorials</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/demos.html\">Demos</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/qdeclarativeexamples.html\">QML Examples</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"http://doc.qt.nokia.com/latest/qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
" </ul> \n" \
" </div>\n" \
" </div>\n" \
" </div>\n" \
@@ -98,20 +104,21 @@ HTML.postpostheader = " </ul>\n" \
" <li id=\"medA\" class=\"t_button active\">A</li>\n" \
" <li id=\"bigA\" class=\"t_button\">A</li>\n" \
" <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \
" <img src=\"images/sep.png\" alt=\"\" /><img id=\"printIcon\" src=\"images/print.png\" alt=\"Print this page\" /></a></li>\n" \
" <span>Print</span></a></li>\n" \
" </ul>\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"content\">\n"
HTML.footer = " </div>\n" \
" <div class=\"feedback t_button\" onclick=\"\$(\'#feedbackBox\').show();\$(\'#blurpage\').show()\">\n" \
HTML.footer = " <!-- /div -->\n" \
" <div class=\"feedback t_button\">\n" \
" [+] Documentation Feedback</div>\n" \
" </div>\n" \
" </div>\n" \
" <div class=\"ft\">\n" \
" <span></span>\n" \
" </div>\n" \
" </div> \n" \
" <div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
@@ -122,13 +129,10 @@ HTML.footer = " </div>\n" \
" href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
" </div>\n" \
" <div id=\"feedbackBox\">\n" \
" <div id=\"feedcloseX\">\n" \
" <a href=\"#\" onclick=\"\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\">X</a>\n" \
" </div>\n" \
" <form action=\"#\">\n" \
" <textarea id=\"feedbox\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea>\n" \
" <input id=\"feedsubmit\" type=\"submit\" onclick=\"\$(\'#feedbackBox\').hide();\$(\'#blurpage\').hide()\"\n" \
" name=\"feedback\" />\n" \
" <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
" <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
" <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit you feedback...</textarea></p>\n" \
" <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
" </form>\n" \
" </div>\n" \
" <div id=\"blurpage\">\n" \

View File

@@ -0,0 +1,4 @@
online = true
# Run qdoc from the directory that contains this file.
include(qtcreator.qdocconf)

View File

@@ -1344,7 +1344,7 @@
Qt Creator provides support for \l{Building and Running Applications}{building and running} Qt applications for
desktop environment and mobile devices. When you install the Nokia Qt SDK,
the build and run settings for the desktop, Maemo, and Symbian targets are set up
the build and run settings for the Maemo and Symbian targets are set up
automatically. However, you need to install and configure some additional software
on the devices:
@@ -1868,9 +1868,17 @@
Qt Creator provides support for building and running Qt applications for
desktop environment and mobile devices. When you install the Nokia Qt SDK,
the build and run settings for the desktop, Maemo, and Symbian targets are
the build and run settings for the Maemo and Symbian targets are
set up automatically.
You can add a target if the necessary tool chain is installed on the
development PC and the Qt version is configured. Click
\inlineimage qtcreator-qt4-addbutton.png "Add Target button"
and select from a list of available
targets. To remove a target, select it and click
\inlineimage qtcreator-target-remove.png "Remove Target button"
.
You can select the targets and click the \gui Run button to build and
run the applications on the targets.
@@ -1884,6 +1892,8 @@
The project pane consists of the following tabs:
\list
\o \l{Building for Multiple Targets}{Targets}
\note If you have installed only one tool chain, the \gui Targets
tab is replaced by a \gui {Build and Run} tab.
\o \l{Specifying Editor Settings}{Editor Settings}
\o \l{Specifying Dependencies}{Dependencies}
\endlist
@@ -2159,16 +2169,71 @@
If you cannot run the application in the emulator, check if:
\list
\o You selected the \gui{Symbian Emulator} target for your application.
\o If you cannot select \gui {Symbian Emulator} as target, check that
Carbide.c++ is installed correctly and that the path to the Carbide.c++
installation directory is specified in the \gui{Carbide directory} field
in the build settings.
\o If the emulator process cannot be started, try closing Qt Creator and
starting the application directly from your file manager. Having
done this, Qt Creator should be able to run your projects in the
emulator.
\endlist
\note Qt Creator does not create release configurations for the
\gui {Symbian Emulator} target, because Symbian Emulator supports only debug
builds.
If this does not help to solve your problem, search the qt-creator@trolltech.com
mailing list archives or provide feedback to us via the methods described on the
\l{http://qt.gitorious.org/qt-creator/pages/Home}{Qt Creator Development Wiki}.
\section1 Building with Remote Compiler
The \gui {Remote Compiler} target is an interface to a compilation service at
Forum Nokia. It provides a simple, standardized environment for building Qt
applications and creating installation packages for Symbian and Maemo devices
when you do not have the necessary tool chains and SDKs installed or they are
not supported on the development PC. You can choose from a set of supported
devices, such as S60 3rd Edition or S60 5th Edition devices.
\note Remote Compiler is an experimental component that you must install
separately from the package that is included in the Nokia Qt SDK.
\list 1
\o In the Nokia Qt SDK installation directory, double-click
SDKMaintenanceTool.exe to install \gui {Experimental APIs}.
\o In Qt Creator, choose \gui {Tools > Options > Projects > Remote Compiler}
to log on to Forum Nokia.
\image remotecompiler-fn-logon.png "Remote Compiler options"
\o Choose \gui {Projects}.
\o Click
\inlineimage qtcreator-qt4-addbutton.png "Add Target button"
and select \gui {Remote Compiler} to add Remote Compiler as a target.
\o Click \gui Add to add mobile device platforms as build configurations.
\o Click the \gui {Target Selector} and select a build configuration.
\o Choose \gui {Build > Build All}.
\endlist
The installation package is generated in the \gui {Build directory} on
the development PC.
For more information about Remote Compiler, choose \gui {Help > Contents >
Remote Compiler}. The document is added during the installation of experimental
APIs.
*/
@@ -6083,6 +6148,40 @@
\endlist
\section1 Troubleshooting
The addresses used in this example might be reserved by some other application
in your network. If you cannot establish a connection, try the following optional
configurations:
\table
\header
\o usb0 in Mad Developer on Device
\o USB Network on Development PC
\o Host Name in Qt Creator Build Settings
\row
\o 172.30.7.15 255.255.255.0
\o 172.30.7.14 255.255.255.0
\o 172.30.7.15
\row
\o 10.133.133.15
\o 10.133.133.14
\o 10.133.133.15
\row
\o 192.168.133.15
\o 192.168.133.14
\o 192.168.133.15
\note You cannot use the value localhost for connections to a device.
\endtable
\note VPN connections might block the device connection.
*/
@@ -7208,6 +7307,11 @@
\o Creating new \c CMake projects with Qt Creator is not supported.
\o Building and packaging sub-projects is not supported for Maemo devices.
\o You must create projects for Maemo targets on the same partition where
you installed Nokia Qt SDK, Qt Creator, and MADDE.
\endlist
\section1 Debugging

View File

@@ -37,30 +37,23 @@ qhp.QtCreator.extraFiles = \
scripts/jquery.js \
images/api_examples.png \
images/api_lookup.png \
images/api_topics.png \
images/arrow_down.png \
images/bg_ll.png \
images/bg_l_blank.png \
images/bg_l.png \
images/bg_lr.png \
images/bg_r.png \
images/bg_ul_blank.png \
images/bg_ul.png \
images/bg_ur_blank.png \
images/bg_ur.png \
images/bg_ll_blank.png \
images/bg_l_blank.png \
images/breadcrumb.png \
images/bullet_dn.png \
images/bullet_gt.png \
images/bullet_sq.png \
images/box_bg.png \
images/feedbackground.png \
images/form_bg.png \
images/horBar.png \
images/page_bg.png \
images/print.png \
images/qt_guide.png \
images/qt-logo.png \
images/qt_ref_doc.png \
images/qt_tools.png \
images/sep.png \
images/header.png \
images/sprites-combined.png
# macros.qdocconf

BIN
doc/templates/images/arrow_down.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

BIN
doc/templates/images/header_bg.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

BIN
doc/templates/images/page.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
doc/templates/images/spinner.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -678,7 +678,7 @@
padding-left: 3px;
background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
height: 20px;
width: 47px;
width: 110px;
}
.shortCut-topleft-inactive span
{

View File

@@ -172,7 +172,11 @@ bool Document::parse_helper(int startToken)
Lexer lexer(_engine);
Parser parser(_engine);
lexer.setCode(_source, /*line = */ 1);
QString source = _source;
if (startToken == QmlJSGrammar::T_FEED_JS_PROGRAM)
extractPragmas(&source);
lexer.setCode(source, /*line = */ 1);
switch (startToken) {
case QmlJSGrammar::T_FEED_UI_PROGRAM:
@@ -224,6 +228,86 @@ Bind *Document::bind() const
return _bind;
}
// this is essentially a copy of QDeclarativeScriptParser::extractPragmas
void Document::extractPragmas(QString *source)
{
const QChar forwardSlash(QLatin1Char('/'));
const QChar star(QLatin1Char('*'));
const QChar newline(QLatin1Char('\n'));
const QChar dot(QLatin1Char('.'));
const QChar semicolon(QLatin1Char(';'));
const QChar space(QLatin1Char(' '));
const QString pragma(QLatin1String(".pragma "));
const QChar *pragmaData = pragma.constData();
QString &script = *source;
const QChar *data = script.constData();
const int length = script.count();
for (int ii = 0; ii < length; ++ii) {
const QChar &c = data[ii];
if (c.isSpace())
continue;
if (c == forwardSlash) {
++ii;
if (ii >= length)
return;
const QChar &c = data[ii];
if (c == forwardSlash) {
// Find next newline
while (ii < length && data[++ii] != newline) {};
} else if (c == star) {
// Find next star
while (true) {
while (ii < length && data[++ii] != star) {};
if (ii + 1 >= length)
return;
if (data[ii + 1] == forwardSlash) {
++ii;
break;
}
}
} else {
return;
}
} else if (c == dot) {
// Could be a pragma!
if (ii + pragma.length() >= length ||
0 != ::memcmp(data + ii, pragmaData, sizeof(QChar) * pragma.length()))
return;
int pragmaStatementIdx = ii;
ii += pragma.length();
while (ii < length && data[ii].isSpace()) { ++ii; }
int startIdx = ii;
while (ii < length && data[ii].isLetter()) { ++ii; }
int endIdx = ii;
if (ii != length && data[ii] != forwardSlash && !data[ii].isSpace() && data[ii] != semicolon)
return;
QString p(data + startIdx, endIdx - startIdx);
if (p != QLatin1String("library"))
return;
for (int jj = pragmaStatementIdx; jj < endIdx; ++jj) script[jj] = space;
} else {
return;
}
}
}
LibraryInfo::LibraryInfo()
: _valid(false)
{

View File

@@ -93,6 +93,7 @@ public:
private:
bool parse_helper(int kind);
static void extractPragmas(QString *source);
private:
QmlJS::Engine *_engine;

View File

@@ -37,6 +37,7 @@
#include <projectexplorer/environment.h>
#include <qtconcurrent/QtConcurrentTools>
#include <QtCore/QtConcurrentRun>
#include <QtCore/QCoreApplication>
#include <QtCore/QSettings>
#include <QtGui/QFormLayout>
#include <QtGui/QBoxLayout>
@@ -255,7 +256,8 @@ QString CMakeSettingsPage::category() const
QString CMakeSettingsPage::displayCategory() const
{
return tr(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
return QCoreApplication::translate("ProjectExplorer",
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
}
QIcon CMakeSettingsPage::categoryIcon() const

View File

@@ -82,8 +82,8 @@ OpenEditorsWindow::OpenEditorsWindow(QWidget *parent) :
void OpenEditorsWindow::selectAndHide()
{
selectEditor(m_editorList->currentItem());
setVisible(false);
selectEditor(m_editorList->currentItem());
}
void OpenEditorsWindow::setVisible(bool visible)

View File

@@ -86,6 +86,13 @@ void DoubleTabWidget::setCurrentIndex(int index)
update();
}
int DoubleTabWidget::currentSubIndex() const
{
if (m_currentIndex >= 0 && m_currentIndex < m_tabs.size())
return m_tabs.at(m_currentIndex).currentSubTab;
return -1;
}
void DoubleTabWidget::setTitle(const QString &title)
{
m_title = title;
@@ -104,10 +111,6 @@ void DoubleTabWidget::addTab(const QString &name, const QStringList &subTabs)
tab.subTabs = subTabs;
tab.currentSubTab = tab.subTabs.isEmpty() ? -1 : 0;
m_tabs.append(tab);
if (m_currentIndex == -1) {
m_currentIndex = m_tabs.size()-1;
emit currentIndexChanged(m_currentIndex, m_tabs.at(m_currentIndex).currentSubTab);
}
update();
}
@@ -118,10 +121,7 @@ void DoubleTabWidget::insertTab(int index, const QString &name, const QStringLis
tab.subTabs = subTabs;
tab.currentSubTab = tab.subTabs.isEmpty() ? -1 : 0;
m_tabs.insert(index, tab);
if (m_currentIndex == -1) {
m_currentIndex = index;
emit currentIndexChanged(m_currentIndex, m_tabs.at(m_currentIndex).currentSubTab);
} else if (m_currentIndex >= index) {
if (m_currentIndex >= index) {
++m_currentIndex;
emit currentIndexChanged(m_currentIndex, m_tabs.at(m_currentIndex).currentSubTab);
}

View File

@@ -30,6 +30,8 @@ public:
int currentIndex() const;
void setCurrentIndex(int index);
int currentSubIndex() const;
signals:
void currentIndexChanged(int index, int subIndex);

View File

@@ -36,6 +36,7 @@
#include <coreplugin/filemanager.h>
#include <QtGui/QLabel>
#include <QtCore/QCoreApplication>
namespace ProjectExplorer {
namespace Internal {
@@ -136,7 +137,8 @@ QString ProjectExplorerSettingsPage::category() const
QString ProjectExplorerSettingsPage::displayCategory() const
{
return tr(Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
return QCoreApplication::translate("ProjectExplorer",
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
}
QIcon ProjectExplorerSettingsPage::categoryIcon() const

View File

@@ -74,23 +74,27 @@ void SessionValidator::fixup(QString &input) const
input = copy;
}
class SessionNameInputDialog : public QDialog
{
Q_OBJECT
public:
SessionNameInputDialog(const QStringList& sessions, const QString &initialValue = QString());
SessionNameInputDialog(const QStringList &sessions, QWidget *parent = 0);
void setValue(const QString &value);
QString value() const;
private:
QLineEdit *m_newSessionLineEdit;
};
SessionNameInputDialog::SessionNameInputDialog(const QStringList& sessions, const QString &initialValue)
SessionNameInputDialog::SessionNameInputDialog(const QStringList &sessions, QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *hlayout = new QVBoxLayout(this);
QLabel *label = new QLabel(tr("Enter the name of the session:"), this);
hlayout->addWidget(label);
m_newSessionLineEdit = new QLineEdit(this);
m_newSessionLineEdit->setText(initialValue);
m_newSessionLineEdit->setValidator(new SessionValidator(this, sessions));
hlayout->addWidget(m_newSessionLineEdit);
QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
@@ -100,11 +104,17 @@ SessionNameInputDialog::SessionNameInputDialog(const QStringList& sessions, cons
setLayout(hlayout);
}
void SessionNameInputDialog::setValue(const QString &value)
{
m_newSessionLineEdit->setText(value);
}
QString SessionNameInputDialog::value() const
{
return m_newSessionLineEdit->text();
}
SessionDialog::SessionDialog(SessionManager *sessionManager)
: m_sessionManager(sessionManager)
{
@@ -174,7 +184,7 @@ void SessionDialog::updateActions()
void SessionDialog::createNew()
{
SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions());
SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), this);
newSessionInputDialog.setWindowTitle(tr("New session name"));
if (newSessionInputDialog.exec() == QDialog::Accepted) {
@@ -192,8 +202,10 @@ void SessionDialog::createNew()
void SessionDialog::clone()
{
SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), m_ui.sessionList->currentItem()->text());
SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), this);
newSessionInputDialog.setValue(m_ui.sessionList->currentItem()->text());
newSessionInputDialog.setWindowTitle(tr("New session name"));
if (newSessionInputDialog.exec() == QDialog::Accepted) {
QString newSession = newSessionInputDialog.value();
if (m_sessionManager->cloneSession(m_ui.sessionList->currentItem()->text(), newSession)) {
@@ -213,11 +225,12 @@ void SessionDialog::remove()
markItems();
}
void SessionDialog::rename()
{
SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), m_ui.sessionList->currentItem()->text());
SessionNameInputDialog newSessionInputDialog(m_sessionManager->sessions(), this);
newSessionInputDialog.setValue(m_ui.sessionList->currentItem()->text());
newSessionInputDialog.setWindowTitle(tr("Rename session"));
if (newSessionInputDialog.exec() == QDialog::Accepted) {
m_sessionManager->renameSession(m_ui.sessionList->currentItem()->text(), newSessionInputDialog.value());
m_ui.sessionList->clear();
@@ -226,7 +239,6 @@ void SessionDialog::rename()
}
}
void SessionDialog::switchToSession()
{
if (m_ui.sessionList->currentItem()) {

View File

@@ -46,9 +46,7 @@ void TargetSelector::insertTarget(int index, const QString &name)
m_targets.insert(index, target);
if (m_currentTargetIndex == -1)
setCurrentIndex(index);
else if (m_currentTargetIndex >= index)
if (m_currentTargetIndex >= index)
setCurrentIndex(m_currentTargetIndex + 1);
update();
}
@@ -59,12 +57,13 @@ void TargetSelector::removeTarget(int index)
m_targets.removeAt(index);
if (m_currentTargetIndex >= m_targets.count())
setCurrentIndex(m_targets.count() - 1);
else if (m_currentTargetIndex >= index)
// force a signal since the target pointed to has changed:
if (m_currentTargetIndex >= m_targets.count()) {
setCurrentIndex(-1);
} else if (m_currentTargetIndex >= index) {
--m_currentTargetIndex;
// force a signal since the index has changed
emit currentChanged(m_currentTargetIndex, m_targets.at(m_currentTargetIndex).currentSubIndex);
}
update();
}

View File

@@ -111,23 +111,25 @@ void TargetSettingsPanelWidget::setupUi()
noTargetLayout->addStretch(10);
m_centralWidget->addWidget(m_noTargetLabel);
connect(m_selector, SIGNAL(currentChanged(int,int)),
this, SLOT(currentTargetChanged(int,int)));
// Save active target now as it will change when targets are added:
Target *activeTarget = m_project->activeTarget();
foreach (Target *t, m_project->targets())
targetAdded(t);
// Now set the correct target
int index = m_targets.indexOf(m_project->activeTarget());
m_selector->setCurrentIndex(index);
m_selector->setCurrentSubIndex(0);
currentTargetChanged(index, 0);
connect(m_selector, SIGNAL(currentChanged(int,int)),
this, SLOT(currentTargetChanged(int,int)));
connect(m_selector, SIGNAL(addButtonClicked()),
this, SLOT(addTarget()));
connect(m_selector, SIGNAL(removeButtonClicked()),
this, SLOT(removeTarget()));
updateTargetAddAndRemoveButtons();
activeTargetChanged(activeTarget);
}
void TargetSettingsPanelWidget::currentTargetChanged(int targetIndex, int subIndex)

View File

@@ -355,7 +355,11 @@ void StatesEditorView::nodeInstancePropertyChanged(const ModelNode &node, const
}
// sets currentState() used in sceneChanged
QmlModelView::nodeInstancePropertyChanged(node, propertyName);
if (!m_settingSilentState)
sceneChanged();
}
void StatesEditorView::stateChanged(const QmlModelState &newQmlModelState, const QmlModelState &oldQmlModelState)
@@ -479,8 +483,11 @@ void StatesEditorView::sceneChanged()
if (debug)
qDebug() << __FUNCTION__;
// If we are in base state we have to update the pixmaps of all states
// otherwise only the pixmpap for the current state
// If we are in base state we have to update the pixmaps of all states,
// otherwise only the pixmap for the current state
// TODO: Since a switch to the base state also results in nodePropertyChanged and
// therefore sceneChanged calls, we're rendering too much here
if (currentState().isValid()) { //during setup we might get sceneChanged signals with an invalid currentState()
if (currentState().isBaseState()) {

View File

@@ -43,6 +43,7 @@ enum {
debug = false
};
namespace QmlDesigner {
QmlModelView::QmlModelView(QObject *parent)

View File

@@ -79,7 +79,7 @@ enum CompletionRelevance {
};
// Temporary workaround until we have proper icons for QML completion items
QIcon iconForColor(const QColor &color)
static QIcon iconForColor(const QColor &color)
{
QPixmap pix(6, 6);
@@ -109,7 +109,7 @@ QIcon iconForColor(const QColor &color)
return pix;
}
bool checkStartOfIdentifier(const QString &word)
static bool checkStartOfIdentifier(const QString &word)
{
if (word.isEmpty())
return false;
@@ -125,7 +125,7 @@ bool checkStartOfIdentifier(const QString &word)
}
}
bool isIdentifierChar(QChar ch)
static bool isIdentifierChar(QChar ch)
{
switch (ch.unicode()) {
case '_': case '$':

View File

@@ -241,11 +241,7 @@ bool MaemoPackageCreationStep::runCommand(QProcess &proc, const QString &command
return false;
}
proc.write("\n"); // For dh_make
if (!proc.waitForFinished(60000) && proc.error() == QProcess::Timedout) {
raiseError(tr("Packaging failed."),
tr("Packaging Error: Command '%1' timed out.").arg(command));
return false;
}
proc.waitForFinished(-1);
if (proc.error() != QProcess::UnknownError || proc.exitCode() != 0) {
QString mainMessage = tr("Packaging Error: Command '%1' failed.")
.arg(command);

View File

@@ -357,7 +357,8 @@ void MaemoSettingsWidget::deployKey()
}
m_ui->deployKeyButton->disconnect();
const QString command = QLatin1String("test -d .ssh || mkdir .ssh && echo '")
const QString command = QLatin1String("test -d .ssh "
"|| mkdir .ssh && chmod 0700 .ssh && echo '")
+ key + QLatin1String("' >> .ssh/authorized_keys");
m_keyDeployer = new MaemoSshRunner(currentConfig().server, command);
connect(m_keyDeployer, SIGNAL(finished()),

View File

@@ -379,9 +379,9 @@ void QemuRuntimeManager::startRuntime()
m_qemuProcess->setProcessEnvironment(env);
m_qemuProcess->setWorkingDirectory(rt.m_root);
const QString app =(QFileInfo(rt.m_bin).isRelative()
? root % QLatin1String("madlib/") % rt.m_bin // Fremantle.
: rt.m_bin) // Haramattan.
const QString app = root + (QFileInfo(rt.m_bin).isRelative()
? QLatin1String("madlib/") % rt.m_bin // Fremantle.
: rt.m_bin) // Haramattan.
#ifdef Q_OS_WIN
% QLatin1String(".exe")
#endif
@@ -389,6 +389,9 @@ void QemuRuntimeManager::startRuntime()
m_qemuProcess->start(app % QLatin1Char(' ') % rt.m_args,
QIODevice::ReadWrite);
if (!m_qemuProcess->waitForStarted())
return;
emit qemuProcessStatus(QemuStarting);
connect(m_qemuAction, SIGNAL(triggered()), this, SLOT(terminateRuntime()));
disconnect(m_qemuAction, SIGNAL(triggered()), this, SLOT(startRuntime()));

View File

@@ -790,7 +790,7 @@ void Qt4PriFileNode::changeFiles(const FileType fileType,
{
QFile qfile(m_projectFilePath);
if (qfile.open(QIODevice::ReadOnly | QIODevice::Text)) {
contents = QString::fromLatin1(qfile.readAll()); // yes, really latin1
contents = QString::fromLocal8Bit(qfile.readAll());
qfile.close();
lines = contents.split(QLatin1Char('\n'));
while (!lines.isEmpty() && lines.last().isEmpty())
@@ -841,7 +841,7 @@ void Qt4PriFileNode::save(const QStringList &lines)
QFile qfile(m_projectFilePath);
if (qfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
foreach (const QString &str, lines) {
qfile.write(str.toLatin1()); // yes, really latin1
qfile.write(str.toLocal8Bit());
qfile.write("\n");
}
qfile.close();
@@ -1024,15 +1024,10 @@ void Qt4ProFileNode::setupReader()
bool Qt4ProFileNode::evaluate()
{
bool parserError = false;
if (!m_readerExact->readProFile(m_projectFilePath)) {
m_project->proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath));
if (!m_readerExact->readProFile(m_projectFilePath))
parserError = true;
}
if (!m_readerCumulative->readProFile(m_projectFilePath)) {
m_project->proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath));
if (!m_readerCumulative->readProFile(m_projectFilePath))
parserError = true;
}
return parserError;
}
@@ -1074,8 +1069,10 @@ void Qt4ProFileNode::applyEvaluate(bool parseResult, bool async)
if (m_readerCumulative)
m_project->destroyProFileReader(m_readerCumulative);
m_readerExact = m_readerCumulative = 0;
if (!parseResult) // Invalidate
if (!parseResult) {
m_project->proFileParseError(tr("Error while parsing file %1. Giving up.").arg(m_projectFilePath));
invalidate();
}
return;
}

View File

@@ -939,7 +939,8 @@ ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode)
ProFileReader *reader = new ProFileReader(m_proFileOption);
connect(reader, SIGNAL(errorFound(QString)),
this, SLOT(proFileParseError(QString)));
this, SLOT(proFileParseError(QString)),
Qt::QueuedConnection);
reader->setOutputDir(qt4ProFileNode->buildDir());

View File

@@ -65,7 +65,7 @@ static int evaluate(const QString &fileName, const QString &in_pwd, const QStrin
if (!(pro = visitor.parsedProFile(fileName)))
return 2;
if (!visitor.accept(pro)) {
delete pro;
pro->deref();
return 2;
}
@@ -108,7 +108,7 @@ static int evaluate(const QString &fileName, const QString &in_pwd, const QStrin
}
}
delete pro;
pro->deref();
return 0;
}

View File

@@ -1,5 +1,6 @@
VPATH += ../../../src/shared/proparser
INCLUDEPATH += ../../../src/shared/proparser
DEPENDPATH += ../../../src/shared/proparser
TEMPLATE = app
TARGET = testreader