Commit 720cb9f3 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/2.6'

Conflicts:
	qtcreator.pri
	qtcreator.qbp
	src/libs/ssh/sshconnection.cpp

Change-Id: I2946cbec1b5159eef9e47949860b28fba1e51529
parents c7f1aeac 236bd842
......@@ -107,7 +107,7 @@ SDK (release builds of Qt using MinGW and Visual C++ 2008).
For the Visual C++ compilers, it is recommended to use the tool 'jom'.
It is a replacement for nmake that utilizes all CPU cores and thus
speeds up compilation significantly. Download it from
ftp://ftp.qt.nokia.com/jom/ and add the executable to the path.
http://releases.qt-project.org/jom/ and add the executable to the path.
8. For convenience, we recommend creating shell prompts with the correct
environment. This can be done by creating a .bat-file
......
<?xml version="1.0"?>
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator {version}</Title>
<MaintenanceTitle>Qt Creator Maintenance</MaintenanceTitle>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://qt-project.org</ProductUrl>
<Icon>logo.png</Icon>
<Watermark>watermark.png</Watermark>
<UninstallerName>QtCreatorUninstaller</UninstallerName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@homeDir@/qtcreator-{version}</TargetDir>
<AdminTargetDir>/opt/qtcreator-{version}</AdminTargetDir>
<Pages>
<Page name="LicenseAgreementPage">
<AcceptLicenseLabel>I have read and understood the terms contained in the above license agreements.</AcceptLicenseLabel>
<RejectLicenseLabel>I do not accept the terms contained in the above license agreements.</RejectLicenseLabel>
</Page>
</Pages>
</Installer>
......@@ -2,7 +2,7 @@
<Installer>
<Name>Qt Creator</Name>
<Version>{version}</Version>
<Title>Qt Creator</Title>
<Title>Qt Creator {version}</Title>
<MaintenanceTitle>Qt Creator Maintenance</MaintenanceTitle>
<Publisher>Qt Project</Publisher>
<ProductUrl>http://qt-project.org</ProductUrl>
......@@ -11,8 +11,7 @@
<Watermark>watermark.png</Watermark>
<UninstallerName>QtCreatorUninstaller</UninstallerName>
<!-- @homeDir@ and @rootDir@ are some of the supported vars -->
<TargetDir>@homeDir@/QtCreator</TargetDir>
<AdminTargetDir>/opt/QtCreator</AdminTargetDir>
<TargetDir>@rootDir@/Qt/qtcreator-{version}</TargetDir>
<Pages>
<Page name="LicenseAgreementPage">
......
......@@ -31,6 +31,7 @@
function Component()
{
installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
installer.setDefaultPageVisible(QInstaller.ComponentSelection, false);
}
Component.prototype.beginInstallation = function()
......@@ -120,7 +121,7 @@ Component.prototype.createOperations = function()
"@TargetDir@\\bin\\qtcreator.exe",
"@StartMenuDir@/Qt Creator.lnk",
"workingDirectory=@homeDir@" );
component.addElevatedOperation("Execute", "{0,3010}", "@TargetDir@\\lib\\vcredist_msvc2010\\vcredist_x86.exe", "/q");
component.addElevatedOperation("Execute", "{0,3010}", "@TargetDir@\\lib\\vcredist_msvc2010\\vcredist_x86.exe", "/norestart", "/q");
registerWindowsFileTypeExtensions();
}
if ( installer.value("os") == "x11" )
......
doc/images/qtcreator-kit-selector.png

5.07 KB | W: | H:

doc/images/qtcreator-kit-selector.png

23.8 KB | W: | H:

doc/images/qtcreator-kit-selector.png
doc/images/qtcreator-kit-selector.png
doc/images/qtcreator-kit-selector.png
doc/images/qtcreator-kit-selector.png
  • 2-up
  • Swipe
  • Onion skin
doc/images/qtcreator-pprunsettings.png

11.3 KB | W: | H:

doc/images/qtcreator-pprunsettings.png

29.8 KB | W: | H:

doc/images/qtcreator-pprunsettings.png
doc/images/qtcreator-pprunsettings.png
doc/images/qtcreator-pprunsettings.png
doc/images/qtcreator-pprunsettings.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -167,7 +167,7 @@
On Windows, nmake does not support the \c{-j} parameter. Instead, we
provide a drop-in replacement called jom. You can download a precompiled
version of jom from \l{ftp://ftp.qt.nokia.com/jom/}{Qt FTP server}.
version of jom from \l{http://releases.qt-project.org/jom/}{Qt Project Release server}.
Put jom.exe in a location in the %PATH%. Go to the \gui {Build Settings}
and set jom.exe as the make command.
......
......@@ -10,6 +10,14 @@
\image qtcreator-pprunsettings.png
The \gui {Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug)} option
(available on Mac OS, only) enables you to debug (for example, step into)
linked frameworks, such as the Qt framework itself. You do not need this
option for debugging your application code. If you select this option, a
crash might occur when debugging applications on Mac OS X Snow Leopard. For
more information, see
\l{Application Crashes when Debugging on Mac OS X Snow Leopard}.
You can also create custom executable run configurations where you
can set the executable to be run. For more information, see
\l{Specifying a Custom Executable to Run}.
......@@ -77,32 +77,8 @@
\section1 Creating Qt Quick UI Projects
\list 1
\o Select \gui {File > New File or Project > Applications >
Qt Quick UI > Choose}.
The \gui{Introduction and Project Location} dialog opens.
\image qmldesigner-new-ui-project-location.png "Introduction and Project Location dialog"
\o In the \gui Name field, give a name to the project.
Do not use spaces and special characters in the project name and
path.
\o In the \gui {Create in} field, enter the path for the project files.
For example, \c {C:\Qt\examples}. To select the path from a
directory tree, click \gui Browse.
\o Click \gui{Next}.
\image qmldesigner-new-ui-project-summary.png "Project Management dialog"
\o Review the project settings, and click \gui{Finish} to create the
project.
\endlist
Select \gui {File > New File or Project > Applications > Qt Quick UI >
Choose} and follow the instructions of the wizard.
\QC creates the following files:
......@@ -127,78 +103,19 @@
\section1 Creating Qt Quick Applications
\list 1
\o Select \gui {File > New File or Project > Applications >
Qt Quick Application (Built-in Elements) > Choose}.
\note We recommend that you use the \gui {Qt Quick Application for
MeeGo Harmattan} template when you develop for MeeGo Harmattan
devices.
The \gui{Introduction and Project Location} dialog opens.
\image qmldesigner-new-project-location.png "Introduction and Project Location dialog"
\o In the \gui Name field, give a name to the project.
Do not use spaces and special characters in the project name and
path.
\o In the \gui {Create in} field, enter the path for the project files.
For example, \c {C:\Qt\examples}. To select the path from a
directory tree, click \gui Browse.
Select \gui File > \gui {New File or Project} > \gui Applications >
\gui {Qt Quick Application 1 (Built-in Elements)} or \gui {Qt Quick
Application 2 (Built-in Elements)} > \gui Choose, and follow the
instructions of the wizard.
\o Click \gui{Next}.
The \gui {Kit Selection} dialog opens.
\image qmldesigner-new-project-qt-versions.png "Kit Selection dialog"
\o Select build and run \l{glossary-buildandrun-kit}{kits} for your project,
and then click \gui{Next}.
\note If only one kit is specified in \gui Tools > \gui Options >
\gui {Build & Run} > \gui Kits, this dialog is skipped.
The \gui {Mobile Options} dialog opens.
\image qmldesigner-new-app-project-mobile-options.png "Mobile Options dialog"
\o In the \gui {Orientation behavior} field, determine how the
application behaves when the orientation of the device display
rotates between portrait and landscape, and then click \gui Next.
\note This dialog opens only if you select a \l{glossary-buildandrun-kit}{kit}
with \gui Maemo5 device type in the \gui {Kit Selection} dialog. On
Harmattan, the Qt Quick Components for MeeGo provide native-looking
rotation.
\o Click \gui Next.
The \gui {Harmattan Specific} dialog opens.
\image qmldesigner-new-project-harmattan-options.png "Harmattan Specific dialog"
\o In the \gui {Application icon} field, select the application
icon to use on Maemo or Harmattan devices, or use the default icon.
The \gui {Project Management} dialog opens.
\image qmldesigner-new-project-summary.png "Project Management dialog"
\o In the \gui {Add to project} field, you can add this project to
another project as a subproject.
\o In the \gui {Add to version control} field, you can add the project
to a version control system.
\o Click \gui Finish to create the project.
\endlist
\note The SDK for a particular target platform might install additional
templates for that platform. For example, the \gui {Qt Quick Application for
MeeGo Harmattan} template is installed as part of the MeeGo Harmattan tool
chain and the QNX templates are installed as part of the BlackBerry NDK or
the QNX SDK.
\QC creates the necessary boilerplate files. Some of the files are
specific to the Maemo or MeeGo Harmattan platform.
specific to a particular target platform.
\section1 Importing QML Applications
......
......@@ -53,7 +53,7 @@ var articleCount = 0;
var exampleCount = 0;
var qturl = ""; // change from "http://doc.qt.nokia.com/4.6/" to 0 so we can have relative links
function processNokiaData(response){
function processData(response){
var propertyTags = response.getElementsByTagName('page');
for (var i=0; i< propertyTags.length; i++) {
......@@ -180,7 +180,7 @@ else
$('.searching').remove();
$('#pageType').removeClass('loading');
$('.list ul').prepend('<li class="menuAlert searching">Searching...</li>');
processNokiaData(response);
processData(response);
}
});
......
......@@ -86,8 +86,15 @@ def main():
raise Exception('Archive not specified (--archive)!')
installer_name = args[0]
config_postfix = ''
if sys.platform == 'darwin':
installer_name = installer_name + '.dmg'
if sys.platform.startswith('win'):
config_postfix = '-windows'
if sys.platform.startswith('linux'):
config_postfix = '-linux'
config_name = 'config' + config_postfix + '.xml'
try:
temp_dir = tempfile.mkdtemp()
......@@ -121,7 +128,7 @@ def main():
os.makedirs(data_path)
shutil.copy(archive, data_path)
ifw_call = [os.path.join(ifw_location, 'bin', 'binarycreator'), '-c', os.path.join(out_config_dir, 'config.xml'), '-p', out_packages_dir, installer_name, '--offline-only' ]
ifw_call = [os.path.join(ifw_location, 'bin', 'binarycreator'), '-c', os.path.join(out_config_dir, config_name), '-p', out_packages_dir, installer_name, '--offline-only' ]
subprocess.check_call(ifw_call, stderr=subprocess.STDOUT)
finally:
print 'Cleaning up...'
......
......@@ -16,8 +16,6 @@
<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins:/usr/lib/qt4/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib/"/>
<arg>-platform</arg>
<arg>blackberry</arg>
<arg>-style</arg>
<arg>qnxlight</arg>
......
......@@ -15,8 +15,6 @@
<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins:/usr/lib/qt4/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib/"/>
<arg>-platform</arg>
<arg>blackberry</arg>
<action system="true">run_native</action>
<asset entry="true" path="%ProjectName%" type="Qnx/Elf">%ProjectName%</asset>
......
......@@ -15,8 +15,6 @@
<env var="QML_IMPORT_PATH" value="app/native/imports"/>
<env var="QT_PLUGIN_PATH" value="app/native/plugins:/usr/lib/qt4/plugins"/>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib/"/>
<arg>-platform</arg>
<arg>blackberry</arg>
<action system="true">run_native</action>
<asset entry="true" path="%ProjectName%" type="Qnx/Elf">%ProjectName%</asset>
......
......@@ -7774,7 +7774,7 @@ konnte dem Projekt &apos;%2&apos; nicht hinzugefügt werden.</translation>
</message>
<message>
<source>&lt;a href=&quot;qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.html&quot;&gt;What is a Session?&lt;/a&gt;</source>
<translation>&lt;a href=&quot;qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.htm&quot;&gt;Was ist eine Sitzung?&lt;/a&gt;</translation>
<translation>&lt;a href=&quot;qthelp://com.nokia.qtcreator/doc/creator-project-managing-sessions.html&quot;&gt;Was ist eine Sitzung?&lt;/a&gt;</translation>
</message>
<message>
<source>Automatically restore the last session when Qt Creator is started.</source>
......@@ -18,10 +18,13 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include "Literals.h"
#include "Name.h"
#include "Names.h"
#include "NameVisitor.h"
#include <cstring>
using namespace CPlusPlus;
Name::Name()
......@@ -65,4 +68,16 @@ void Name::accept(const Name *name, NameVisitor *visitor)
name->accept(visitor);
}
bool Name::Compare::operator()(const Name *name, const Name *other) const
{
if (name == 0)
return other != 0;
if (other == 0)
return false;
if (name == other)
return false;
const Identifier *id = name->identifier();
const Identifier *otherId = other->identifier();
return std::strcmp(id->chars(), otherId->chars()) < 0;
}
......@@ -23,6 +23,7 @@
#include "CPlusPlusForwardDeclarations.h"
#include <functional>
namespace CPlusPlus {
......@@ -55,6 +56,11 @@ public:
void accept(NameVisitor *visitor) const;
static void accept(const Name *name, NameVisitor *visitor);
public:
struct Compare: std::binary_function<const Name *, const Name *, bool> {
bool operator()(const Name *name, const Name *other) const;
};
protected:
virtual void accept0(NameVisitor *visitor) const = 0;
};
......
......@@ -514,10 +514,12 @@ Symbol *Clone::instantiate(Template *templ, const FullySpecifiedType *const args
//
// substitutions
//
FullySpecifiedType Subst::apply(const Name *name) const
{
if (name) {
std::map<const Name *, FullySpecifiedType>::const_iterator it = _map.find(name);
std::map<const Name *, FullySpecifiedType, Name::Compare>::const_iterator it = _map.find(name);
if (it != _map.end())
return it->second;
else if (_previous)
......
......@@ -24,6 +24,7 @@
#include "CPlusPlusForwardDeclarations.h"
#include "TypeVisitor.h"
#include "FullySpecifiedType.h"
#include "Name.h"
#include "NameVisitor.h"
#include "SymbolVisitor.h"
#include <map>
......@@ -56,7 +57,7 @@ public:
private:
Control *_control;
Subst *_previous;
std::map<const Name *, FullySpecifiedType> _map;
std::map<const Name *, FullySpecifiedType, Name::Compare> _map;
};
class CPLUSPLUS_EXPORT CloneType: protected TypeVisitor
......
......@@ -120,21 +120,12 @@ bool compareFullyQualifiedName(const QList<const Name *> &path, const QList<cons
}
bool ClassOrNamespace::CompareName::operator()(const Name *name, const Name *other) const
{
Q_ASSERT(name != 0);
Q_ASSERT(other != 0);
const Identifier *id = name->identifier();
const Identifier *otherId = other->identifier();
return strcmp(id->chars(), otherId->chars()) < 0;
}
/////////////////////////////////////////////////////////////////////
// LookupContext
/////////////////////////////////////////////////////////////////////
LookupContext::LookupContext()
: _control(new Control())
, m_expandTemplates(false)
{ }
LookupContext::LookupContext(Document::Ptr thisDocument,
......@@ -142,7 +133,8 @@ LookupContext::LookupContext(Document::Ptr thisDocument,
: _expressionDocument(Document::create("<LookupContext>")),
_thisDocument(thisDocument),
_snapshot(snapshot),
_control(new Control())
_control(new Control()),
m_expandTemplates(false)
{
}
......@@ -152,7 +144,8 @@ LookupContext::LookupContext(Document::Ptr expressionDocument,
: _expressionDocument(expressionDocument),
_thisDocument(thisDocument),
_snapshot(snapshot),
_control(new Control())
_control(new Control()),
m_expandTemplates(false)
{
}
......@@ -161,7 +154,8 @@ LookupContext::LookupContext(const LookupContext &other)
_thisDocument(other._thisDocument),
_snapshot(other._snapshot),
_bindings(other._bindings),
_control(other._control)
_control(other._control),
m_expandTemplates(other.m_expandTemplates)
{ }
LookupContext &LookupContext::operator = (const LookupContext &other)
......@@ -171,6 +165,7 @@ LookupContext &LookupContext::operator = (const LookupContext &other)
_snapshot = other._snapshot;
_bindings = other._bindings;
_control = other._control;
m_expandTemplates = other.m_expandTemplates;
return *this;
}
......@@ -227,8 +222,10 @@ const Name *LookupContext::minimalName(Symbol *symbol, ClassOrNamespace *target,
QSharedPointer<CreateBindings> LookupContext::bindings() const
{
if (! _bindings)
if (! _bindings) {
_bindings = QSharedPointer<CreateBindings>(new CreateBindings(_thisDocument, _snapshot, control()));
_bindings->setExpandTemplates(m_expandTemplates);
}
return _bindings;
}
......@@ -728,7 +725,6 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
instantiation->_instantiationOrigin = origin;
// The instantiation should have all symbols, enums, and usings from the reference.
instantiation->_symbols.append(reference->symbols());
instantiation->_enums.append(reference->enums());
instantiation->_usings.append(reference->usings());
......@@ -736,6 +732,28 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
// now must worry about dependent names in base classes.
if (Template *templ = referenceClass->enclosingTemplate()) {
const unsigned argumentCount = templId->templateArgumentCount();
if (_factory->expandTemplates()) {
Subst subst(_control.data());
for (unsigned i = 0, ei = std::min(argumentCount, templ->templateParameterCount()); i < ei; ++i) {
const TypenameArgument *tParam = templ->templateParameterAt(i)->asTypenameArgument();
if (!tParam)
continue;
const Name *name = tParam->name();
if (!name)
continue;
const FullySpecifiedType &ty = templId->templateArgumentAt(i);
subst.bind(name, ty);
}
Clone cloner(_control.data());
foreach (Symbol *s, reference->symbols()) {
instantiation->_symbols.append(cloner.symbol(s, &subst));
}
} else {
instantiation->_symbols.append(reference->symbols());
}
QHash<const Name*, unsigned> templParams;
for (unsigned i = 0; i < templ->templateParameterCount(); ++i)
templParams.insert(templ->templateParameterAt(i)->name(), i);
......@@ -794,6 +812,8 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
if (baseBinding && !knownUsings.contains(baseBinding))
instantiation->addUsing(baseBinding);
}
} else {
instantiation->_symbols.append(reference->symbols());
}
_alreadyConsideredTemplates.clear(templId);
......@@ -907,7 +927,7 @@ ClassOrNamespace *ClassOrNamespace::findOrCreateType(const Name *name, ClassOrNa
}
CreateBindings::CreateBindings(Document::Ptr thisDocument, const Snapshot &snapshot, QSharedPointer<Control> control)
: _snapshot(snapshot), _control(control)
: _snapshot(snapshot), _control(control), _expandTemplates(false)
{
_globalNamespace = allocClassOrNamespace(/*parent = */ 0);
_currentClassOrNamespace = _globalNamespace;
......
......@@ -119,12 +119,7 @@ private:
ClassOrNamespace *nestedType(const Name *name, ClassOrNamespace *origin);
private:
struct CompareName: std::binary_function<const Name *, const Name *, bool> {
bool operator()(const Name *name, const Name *other) const;
};
private:
typedef std::map<const Name *, ClassOrNamespace *, CompareName> Table;
typedef std::map<const Name *, ClassOrNamespace *, Name::Compare> Table;
CreateBindings *_factory;
ClassOrNamespace *_parent;
QList<Symbol *> _symbols;
......@@ -163,6 +158,11 @@ public:
/// \internal
QSharedPointer<Control> control() const;
bool expandTemplates() const
{ return _expandTemplates; }
void setExpandTemplates(bool expandTemplates)
{ _expandTemplates = expandTemplates; }
/// Searches in \a scope for symbols with the given \a name.
/// Store the result in \a results.
/// \internal
......@@ -223,6 +223,7 @@ private:
QList<ClassOrNamespace *> _entities;
ClassOrNamespace *_globalNamespace;
ClassOrNamespace *_currentClassOrNamespace;
bool _expandTemplates;
};
class CPLUSPLUS_EXPORT LookupContext
......@@ -265,6 +266,9 @@ public:
static const Name *minimalName(Symbol *symbol, ClassOrNamespace *target, Control *control);
void setExpandTemplates(bool expandTemplates)
{ m_expandTemplates = expandTemplates; }
private:
// The current expression.
Document::Ptr _expressionDocument;
......@@ -279,6 +283,8 @@ private:
mutable QSharedPointer<CreateBindings> _bindings;
QSharedPointer<Control> _control;
bool m_expandTemplates;
};
bool CPLUSPLUS_EXPORT compareName(const Name *name, const Name *other);
......
......@@ -41,7 +41,8 @@ using namespace CPlusPlus;
TypeOfExpression::TypeOfExpression():
m_ast(0),
m_scope(0)
m_scope(0),
m_expandTemplates(false)
{
}
......@@ -107,6 +108,7 @@ QList<LookupItem> TypeOfExpression::operator()(ExpressionAST *expression,
m_lookupContext = LookupContext(document, m_thisDocument, m_snapshot);
m_lookupContext.setBindings(m_bindings);
m_lookupContext.setExpandTemplates(m_expandTemplates);
ResolveExpression resolve(m_lookupContext);
const QList<LookupItem> items = resolve(m_ast, scope);
......@@ -127,6 +129,7 @@ QList<LookupItem> TypeOfExpression::reference(ExpressionAST *expression,
m_lookupContext = LookupContext(document, m_thisDocument, m_snapshot);
m_lookupContext.setBindings(m_bindings);
m_lookupContext.setExpandTemplates(m_expandTemplates);
ResolveExpression resolve(m_lookupContext);
const QList<LookupItem> items = resolve.reference(m_ast, scope);
......
......@@ -123,6 +123,9 @@ public:
ExpressionAST *expressionAST() const;
QByteArray preprocessedExpression(const QByteArray &utf8code) const;
void setExpandTemplates(bool expandTemplates)
{ m_expandTemplates = expandTemplates; }
private:
void processEnvironment(Document::Ptr doc, Environment *env,
......@@ -137,6 +140,8 @@ private:
Scope *m_scope;
LookupContext m_lookupContext;
mutable QSharedPointer<Environment> m_environment;
bool m_expandTemplates;
};
ExpressionAST CPLUSPLUS_EXPORT *extractExpressionAST(Document::Ptr doc);
......
......@@ -188,9 +188,15 @@ void SshChannelManager::insertChannel(AbstractSshChannel *priv,
int SshChannelManager::closeAllChannels(CloseAllMode mode)
{
const int count = m_channels.count();
for (ChannelIterator it = m_channels.begin(); it != m_channels.end(); ++it)
it.value()->closeChannel();
int count = 0;
for (ChannelIterator it = m_channels.begin(); it != m_channels.end(); ++it) {
AbstractSshChannel * const channel = it.value();
QSSH_ASSERT(channel->channelState() != AbstractSshChannel::Closed);
if (channel->channelState() != AbstractSshChannel::CloseRequested) {
channel->closeChannel();
++count;
}
}
if (mode == CloseAllAndReset) {
m_channels.clear();
m_sessions.clear();
......