Commit d9d0aba1 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.2'

Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/coreplugin/editormanager/editormanager.cpp
	src/plugins/projectexplorer/editorconfiguration.cpp
	src/plugins/projectexplorer/projectfilewizardextension.cpp
	src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp

Change-Id: I8de0f6fcdd8d214fbc14e79f74cb0206e6e2c6c1
parents 23536e9b 8c133689
......@@ -6,8 +6,8 @@ headerdirs =
sourcedirs = $SRCDIR/src
imagedirs = $SRCDIR/images $SRCDIR/templates/images
outputdir = $OUTDIR
exampledirs = $SRCDIR/examples \
$SRCDIR/snippets
exampledirs = $SRCDIR/examples
indexes += $QDOC_INDEX_DIR/qtwidgets/qtwidgets.index \
$QDOC_INDEX_DIR/qtcore/qtcore.index \
$QDOC_INDEX_DIR/qtqml/qtqml.index \
......
doc/images/creator-diff-editor.png

52.1 KB | W: | H:

doc/images/creator-diff-editor.png

46.4 KB | W: | H:

doc/images/creator-diff-editor.png
doc/images/creator-diff-editor.png
doc/images/creator-diff-editor.png
doc/images/creator-diff-editor.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -51,6 +51,15 @@
indicates lines that contain added text (painted a darker green) in the
right pane.
To view the differences in a unified view where changed rows are placed
below each other, select
\inlineimage qtcreator-switchto-unified-diffeditor.png
(\gui {Switch to Unified Diff Editor}).
To switch back to the side-by-side view, select
\inlineimage qtcreator-switchto-sidebyside-diffeditor.png
(\gui {Switch to Side by Side Diff Editor}).
To change the default colors, select \gui Tools > \gui Options >
\gui {Text Editor} > \gui {Font & Colors}. Create your own color scheme and
select new colors for the following options:
......@@ -86,4 +95,8 @@
synchronized. To use them independently of each other, select the
\inlineimage qtcreator-synchronizefocus.png
(\gui {Synchronize Horizontal Scroll Bars}) button.
If the files change outside \QC, select
\inlineimage qtcreator-regenerate-index.png
(\gui {Reload Editor}) to compare them again and to show the results.
*/
......@@ -2217,7 +2217,8 @@
locator. For example, to open main.cpp to line 41, enter: \c {main.cpp:41}.
If the path to a file is very long, it might not fit into the locator
window. To view the full path, press \key Alt when the filename is selected.
window. To view the full path, press \key Alt when the filename is selected
or use the handle next to the locator window to increase the window width.
It is also possible to enter only a part of a search string. As you type,
the locator shows the occurrences of that string regardless of where in the
......
......@@ -45,6 +45,15 @@
parsed .pro files. For more information on how the commands are constructed,
see \l{Starting External Processes}.
\section2 Creating Run Configurations for Subprojects
To prevent \QC from automatically creating run configurations for SUBDIRS
projects, specify the following variable in the .pro file of the SUBDIRS
project: \c {CONFIG += qtc_runnable}.
\QC creates run configurations only for subprojects that also have
\c {CONFIG += qtc_runnable} set in their .pro files.
\include projects/creator-projects-settings-run-desktop.qdocinc
\include projects/creator-projects-settings-run-analyze.qdocinc
\include projects/creator-projects-settings-run-debug.qdocinc
......
......@@ -73,7 +73,7 @@ Module {
Artifact {
fileTags: ["qt_plugin_metadata"]
filePath: {
var destdir = FileInfo.joinPaths(product.moduleProperty("Qt/core", "generatedFilesDir"),
var destdir = FileInfo.joinPaths(product.moduleProperty("Qt.core", "generatedFilesDir"),
input.fileName);
return destdir.replace(/\.[^\.]*$/, '.json');
}
......@@ -81,7 +81,7 @@ Module {
prepare: {
var xslFile = project.path + "/../qtcreatorplugin2json.xsl"; // project is "Plugins"
var xmlPatternsPath = product.moduleProperty("Qt/core", "binPath") + "/xmlpatterns";
var xmlPatternsPath = product.moduleProperty("Qt.core", "binPath") + "/xmlpatterns";
var args = [
"-no-format",
"-output",
......
......@@ -49,7 +49,7 @@ minQtVersion(5, 0, 0):exists(src/shared/qbs/qbs.pro) {
QBS_APPS_RPATH_DIR = @loader_path/../PlugIns
} else {
QBS_PLUGINS_BUILD_DIR = $${IDE_BUILD_TREE}/$${IDE_LIBRARY_BASENAME}/qtcreator
QBS_APPS_RPATH_DIR = \\\$\\\$ORIGIN/../$$IDE_LIBRARY_BASENAME/qtcreator
QBS_APPS_RPATH_DIR = \$\$ORIGIN/../$$IDE_LIBRARY_BASENAME/qtcreator
}
cache(QBS_PLUGINS_BUILD_DIR)
cache(QBS_APPS_RPATH_DIR)
......@@ -65,8 +65,10 @@ minQtVersion(5, 0, 0):exists(src/shared/qbs/qbs.pro) {
cache(QBS_RELATIVE_PLUGINS_PATH)
QBS_RELATIVE_SEARCH_PATH = $$relative_path($$QBS_RESOURCES_BUILD_DIR, $$QBS_APPS_DESTDIR)
cache(QBS_RELATIVE_SEARCH_PATH)
QBS_CONFIG_ADDITION = qbs_no_dev_install qbs_enable_project_file_updates
cache(CONFIG, add, QBS_CONFIG_ADDITION)
!qbs_no_dev_install {
QBS_CONFIG_ADDITION = qbs_no_dev_install qbs_enable_project_file_updates
cache(CONFIG, add, QBS_CONFIG_ADDITION)
}
}
contains(QT_ARCH, i386): ARCHITECTURE = x86
......
......@@ -37,7 +37,9 @@
namespace QmlDesigner {
static QCache<qint32, SharedMemory> globalSharedMemoryCache(10000);
// using cache as a container which deletes sharedmemory pointers at process exit
typedef QCache<qint32, SharedMemory> GlobalSharedMemoryContainer;
Q_GLOBAL_STATIC_WITH_ARGS(GlobalSharedMemoryContainer, globalSharedMemoryContainer, (10000))
ValuesChangedCommand::ValuesChangedCommand()
: m_keyNumber(0)
......@@ -63,7 +65,7 @@ quint32 ValuesChangedCommand::keyNumber() const
void ValuesChangedCommand::removeSharedMemorys(const QVector<qint32> &keyNumberVector)
{
foreach (qint32 keyNumber, keyNumberVector) {
SharedMemory *sharedMemory = globalSharedMemoryCache.take(keyNumber);
SharedMemory *sharedMemory = globalSharedMemoryContainer()->take(keyNumber);
delete sharedMemory;
}
}
......@@ -82,8 +84,10 @@ static SharedMemory *createSharedMemory(qint32 key, int byteCount)
bool sharedMemoryIsCreated = sharedMemory->create(byteCount);
if (sharedMemoryIsCreated) {
globalSharedMemoryCache.insert(key, sharedMemory);
globalSharedMemoryContainer()->insert(key, sharedMemory);
return sharedMemory;
} else {
delete sharedMemory;
}
return 0;
......
......@@ -42,7 +42,9 @@
namespace QmlDesigner {
static QCache<qint32, SharedMemory> globalSharedMemoryCache(10000);
// using cache as a container which deletes sharedmemory pointers at process exit
typedef QCache<qint32, SharedMemory> GlobalSharedMemoryContainer;
Q_GLOBAL_STATIC_WITH_ARGS(GlobalSharedMemoryContainer, globalSharedMemoryContainer, (10000))
ImageContainer::ImageContainer()
: m_instanceId(-1),
......@@ -82,7 +84,7 @@ void ImageContainer::setImage(const QImage &image)
void ImageContainer::removeSharedMemorys(const QVector<qint32> &keyNumberVector)
{
foreach (qint32 keyNumber, keyNumberVector) {
SharedMemory *sharedMemory = globalSharedMemoryCache.take(keyNumber);
SharedMemory *sharedMemory = globalSharedMemoryContainer()->take(keyNumber);
delete sharedMemory;
}
}
......@@ -91,13 +93,13 @@ static const QLatin1String imageKeyTemplateString("Image-%1");
static SharedMemory *createSharedMemory(qint32 key, int byteCount)
{
SharedMemory *sharedMemory = globalSharedMemoryCache.take(key);
SharedMemory *sharedMemory = (*globalSharedMemoryContainer())[key];
if (sharedMemory == 0) {
sharedMemory = new SharedMemory(QString(imageKeyTemplateString).arg(key));
bool sharedMemoryIsCreated = sharedMemory->create(byteCount);
if (sharedMemoryIsCreated) {
globalSharedMemoryCache.insert(key, sharedMemory);
globalSharedMemoryContainer()->insert(key, sharedMemory);
} else {
delete sharedMemory;
sharedMemory = 0;
......@@ -118,8 +120,7 @@ static SharedMemory *createSharedMemory(qint32 key, int byteCount)
}
if (!sharedMemory->isAttached()) {
globalSharedMemoryCache.remove(key);
delete sharedMemory;
globalSharedMemoryContainer()->remove(key);
sharedMemory = 0;
}
}
......
......@@ -49,16 +49,10 @@
#include <private/qcore_unix_p.h>
#ifdef Q_OS_OSX
#define NAME_MAX PSHMNAMLEN
#endif
#ifndef QStringLiteral
#define QStringLiteral(str) QString::fromUtf8(str)
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#define QStringLiteral(str) QString::fromLatin1(str)
#endif
#include <QRegExp>
namespace QmlDesigner {
class SharedMemoryLocker
......
import QtQuick 2.2
import QtQuick 2.1
import QtQuick.Controls 1.0
Rectangle {
property string title
property Item toolBar
property Item statusBar
property alias contentItem : contentArea
default property alias data: contentArea.data
onStatusBarChanged: { if (statusBar) { statusBar.parent = statusBarArea } }
onToolBarChanged: { if (toolBar) { toolBar.parent = toolBarArea } }
Item {
id: contentArea
anchors.top: toolBarArea.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: statusBarArea.top
}
Item {
id: toolBarArea
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
implicitHeight: childrenRect.height
height: visibleChildren.length > 0 ? implicitHeight: 0
}
Item {
id: statusBarArea
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
implicitHeight: childrenRect.height
height: 0
//The status bar is not visible for now
//height: visibleChildren.length > 0 ? implicitHeight: 0
}
}
......@@ -91,6 +91,14 @@ static bool isPropertyBlackListed(const QmlDesigner::PropertyName &propertyName)
return false;
}
static bool isSimpleExpression(const QString &expression)
{
if (expression.startsWith(QStringLiteral("{")))
return false;
return true;
}
namespace QmlDesigner {
namespace Internal {
......@@ -512,6 +520,9 @@ void ObjectNodeInstance::setPropertyBinding(const PropertyName &name, const QStr
if (ignoredProperties().contains(name))
return;
if (!isSimpleExpression(expression))
return;
QQmlProperty property(object(), name, context());
if (!property.isValid())
......@@ -1084,6 +1095,15 @@ static bool isCrashingType(QQmlType *type)
if (type->qmlTypeName() == QStringLiteral("QtMultimedia/Audio"))
return true;
if (type->qmlTypeName() == QStringLiteral("QtQuick.Controls/MenuItem"))
return true;
if (type->qmlTypeName() == QStringLiteral("QtQuick.Controls/Menu"))
return true;
if (type->qmlTypeName() == QStringLiteral("QtQuick/Timer"))
return true;
}
return false;
......
......@@ -38,11 +38,26 @@
#include <designersupport.h>
#if defined(Q_OS_UNIX)
#include <unistd.h>
#elif defined(Q_OS_WIN)
#include <windows.h>
#endif
namespace QmlDesigner {
static void prioritizeDown()
{
#if defined(Q_OS_UNIX)
nice(19);
#elif defined(Q_OS_WIN)
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
#endif
}
Qt5NodeInstanceClientProxy::Qt5NodeInstanceClientProxy(QObject *parent) :
NodeInstanceClientProxy(parent)
{
prioritizeDown();
DesignerSupport::activateDesignerWindowManager();
if (QCoreApplication::arguments().at(1) == QLatin1String("--readcapturedstream")) {
qputenv("DESIGNER_DONT_USE_SHARED_MEMORY", "1");
......
......@@ -39,10 +39,7 @@ Controls.CheckBox {
property color highlightColor: "orange"
property color textColor: colorLogic.textColor
onTextChanged: {
if (text.charAt(0) !== " ")
text = " " + text
}
opacity: enabled ? 1 : 0.5
property variant backendValue
......
......@@ -66,8 +66,11 @@ Controls.ComboBox {
var index = comboBox.find(enumString)
if (index < 0)
index = 0
if (index !== comboBox.currentIndex)
comboBox.currentIndex = comboBox.find(enumString)
comboBox.currentIndex = index
} else {
if (comboBox.currentIndex !== backendValue.value)
......
......@@ -32,7 +32,7 @@ import QtQuick.Controls 1.1 as Controls
import QtQuick.Controls.Styles 1.1
CheckBoxStyle {
spacing: 8
spacing: 24
label: Controls.Label { text: control.text ; color: checkBox.textColor }
indicator: Item {
implicitWidth: 16
......
GroupBox 2.0 GroupBox.qml
LineEdit 2.0 LineEdit.qml
SpinBox 2.0 SpinBox.qml
AligmentHorizontalButtons 2.0 AligmentHorizontalButtons.qml
AligmentVerticalButtons 2.0 AligmentVerticalButtons.qml
AnchorButtons 2.0 AnchorButtons.qml
BoolButtonRowButton 2.0 BoolButtonRowButton.qml
Button 2.0 Button.qml
Label 2.0 Label.qml
Section 2.0 Section.qml
ButtonRow 2.0 ButtonRow.qml
ButtonRowButton 2.0 ButtonRowButton.qml
CheckBox 2.0 CheckBox.qml
TabView 2.0 TabView.qml
Tab 2.0 Tab.qml
ScrollView 2.0 ScrollView.qml
ComboBox 2.0 ComboBox.qml
CustomComboBoxStyle 2.0 CustomComboBoxStyle.qml
SectionLayout 2.0 SectionLayout.qml
SecondColumnLayout 2.0 SecondColumnLayout.qml
ExpandingSpacer 2.0 ExpandingSpacer.qml
ColorButton 2.0 ColorButton.qml
ColorCheckButton 2.0 ColorCheckButton.qml
HueSlider 2.0 HueSlider.qml
GradientLine 2.0 GradientLine.qml
SliderSpinBox 2.0 SliderSpinBox.qml
ColorEditor 2.0 ColorEditor.qml
IconLabel 2.0 IconLabel.qml
ColorLogic 2.0 ColorLogic.qml
ComboBox 2.0 ComboBox.qml
CustomCheckBoxStyle 2.0 CustomCheckBoxStyle.qml
CustomComboBoxStyle 2.0 CustomComboBoxStyle.qml
CustomSpinBoxStyle 2.0 CustomSpinBoxStyle.qml
ExpandingSpacer 2.0 ExpandingSpacer.qml
ExtendedFunctionButton 2.0 ExtendedFunctionButton.qml
ButtonRow 2.0 ButtonRow.qml
ButtonRowButton 2.0 ButtonRowButton.qml
BoolButtonRowButton 2.0 BoolButtonRowButton.qml
FontStyleButtons 2.0 FontStyleButtons.qml
AnchorButtons 2.0 AnchorButtons.qml
AligmentHorizontalButtons 2.0 AligmentHorizontalButtons.qml
AligmentVerticalButtons 2.0 AligmentVerticalButtons.qml
StandardTextSection 2.0 StandardTextSection.qml
FontSection 2.0 FontSection.qml
FlickableSection 2.0 FlickableSection.qml
UrlChooser 2.0 UrlChooser.qml
FontComboBox 2.0 FontComboBox.qml
FontSection 2.0 FontSection.qml
FontStyleButtons 2.0 FontStyleButtons.qml
GradientLine 2.0 GradientLine.qml
GroupBox 2.0 GroupBox.qml
HueSlider 2.0 HueSlider.qml
IconLabel 2.0 IconLabel.qml
Label 2.0 Label.qml
LineEdit 2.0 LineEdit.qml
OriginControl 2.0 OriginControl.qml
CustomComboBoxStyle 2.0 CustomComboBoxStyle.qml
CustomSpinBoxStyle 2.0 CustomSpinBoxStyle.qml
CustomCheckBoxStyle 2.0 CustomCheckBoxStyle.qml
ColorLogic 2.0 ColorLogic.qml
ScrollView 2.0 ScrollView.qml
SecondColumnLayout 2.0 SecondColumnLayout.qml
Section 2.0 Section.qml
SectionLayout 2.0 SectionLayout.qml
SliderSpinBox 2.0 SliderSpinBox.qml
SpinBox 2.0 SpinBox.qml
StandardTextSection 2.0 StandardTextSection.qml
Tab 2.0 Tab.qml
TabView 2.0 TabView.qml
ToolTipArea 2.0 ToolTipArea.qml
UrlChooser 2.0 UrlChooser.qml
......@@ -4,4 +4,6 @@ Label {
}
LineEdit {
backendValue: backendValues.%2
Layout.fillWidth: true
showTranslateCheckBox: false
}
\ No newline at end of file
......@@ -75,17 +75,14 @@ Rectangle {
placeholderText: qsTr("id")
text: backendValues.id.value
Layout.fillWidth: true
Layout.maximumWidth: 320
showTranslateCheckBox: false
showExtendedFunctionButton: false
}
ExpandingSpacer {
}
// workaround: without this item the lineedit does not shrink to the
// right size after resizing to a wider width
Item {
width: 16
height: 16
width: 0
height: 1
}
}
}
......
......@@ -75,15 +75,14 @@ Rectangle {
placeholderText: qsTr("id")
text: backendValues.id.value
Layout.fillWidth: true
Layout.maximumWidth: 320
showTranslateCheckBox: false
showExtendedFunctionButton: false
}
ExpandingSpacer {
}
// workaround: without this item the lineedit does not shrink to the
// right size after resizing to a wider width
Item {
width: 16
height: 16
width: 0
height: 1
}
}
}
......
......@@ -30,7 +30,7 @@
****************************************************************************/
Custom class wizard example configuration file. -->
<wizard version="1" class="qt4project" firstpage="10" kind="project" id="A.ScriptGeneratedProject" category="B.CustomProjects">
<wizard version="1" class="qmakeproject" firstpage="10" kind="project" id="A.ScriptGeneratedProject" category="B.CustomProjects">
<description>Creates a simple project using a generator script</description>
<displayname>Simple Script-Generated Project</displayname>;
<displaycategory>Custom Projects</displaycategory>
......
......@@ -25,6 +25,7 @@ QtcLibrary {
files: [
"QtConcurrentTools",
"algorithm.h",
"annotateditemdelegate.cpp",
"annotateditemdelegate.h",
"ansiescapecodehandler.cpp",
......
......@@ -37,8 +37,10 @@
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/target.h>
#include <qtsupport/qtkitinformation.h>
#include <utils/qtcassert.h>
#include <QDir>
#include <QTime>
#include <QtConcurrentRun>
#include <QTemporaryFile>
......@@ -93,6 +95,10 @@ AndroidRunner::AndroidRunner(QObject *parent,
m_pongFile = _("/data/local/tmp/qt/debug-pong-") + m_packageName;
m_gdbserverSocket = packageDir + _("/debug-socket");
m_gdbserverPath = packageDir + _("/lib/gdbserver");
const QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
if (version && version->qtVersion() >= QtSupport::QtVersionNumber(5, 4, 0))
m_gdbserverPath += _(".so");
m_gdbserverCommand = m_gdbserverPath + _(" --multi +") + m_gdbserverSocket;
// Detect busybox, as we need to pass -w to ps to get wide output.
QProcess psProc;
......@@ -292,7 +298,7 @@ void AndroidRunner::asyncStart()
// Handling ping.
for (int i = 0; ; ++i) {
QTemporaryFile tmp(_("pingpong"));
QTemporaryFile tmp(QDir::tempPath() + _("/pingpong"));
tmp.open();
tmp.close();
......@@ -324,7 +330,7 @@ void AndroidRunner::asyncStart()
void AndroidRunner::handleRemoteDebuggerRunning()
{
if (m_useCppDebugger) {
QTemporaryFile tmp(_("pingpong"));
QTemporaryFile tmp(QDir::tempPath() + _("/pingpong"));
tmp.open();
QProcess process;
......
......@@ -592,8 +592,8 @@ void AndroidSettingsWidget::showGdbWarningDialog()
tr("Unsupported GDB"),
tr("The GDB inside this NDK seems to not support Python. "
"The Qt Project offers fixed GDB builds at: "
"<a href=\"http://download.qt-project.org/official_releases/gdb/osx/\">"
"http://download.qt-project.org/official_releases/gdb/osx/</a>"));
"<a href=\"http://download.qt-project.org/official_releases/gdb/\">"
"http://download.qt-project.org/official_releases/gdb/</a>"));
}
void AndroidSettingsWidget::manageAVD()
......
......@@ -1629,6 +1629,8 @@ bool EditorManagerPrivate::saveDocumentAs(IDocument *document)
const QString filter = MimeDatabase::allFiltersString();
QString selectedFilter =
MimeDatabase::findByFile(QFileInfo(document->filePath())).filterString();
if (selectedFilter.isEmpty())
selectedFilter = MimeDatabase::findByType(document->mimeType()).filterString();
const QString &absoluteFilePath =
DocumentManager::getSaveAsFileName(document, filter, &selectedFilter);
......
......@@ -611,6 +611,7 @@ void DiffEditor::showDiffEditor(QWidget *newEditor)
writeCurrentDiffEditorSetting(m_currentEditor);
updateDiffEditorSwitcher();
widget()->setFocusProxy(m_currentEditor);
}
QWidget *DiffEditor::readLegacyCurrentDiffEditorSetting()
......
......@@ -272,4 +272,14 @@ void DiffEditorController::requestChunkActions(QMenu *menu,
emit chunkActionsRequested(menu, diffFileIndex, chunkIndex);
}
void DiffEditorController::requestSaveState()
{
emit saveStateRequested();
}
void DiffEditorController::requestRestoreState()
{
emit restoreStateRequested();
}
} // namespace DiffEditor
......@@ -73,6 +73,8 @@ public slots:
void requestChunkActions(QMenu *menu,
int diffFileIndex,
int chunkIndex);
void requestSaveState();
void requestRestoreState();
void branchesForCommitReceived(const QString &output);
void expandBranchesRequested();
......@@ -87,6 +89,8 @@ signals:
void chunkActionsRequested(QMenu *menu,
int diffFileIndex,
int chunkIndex);
void saveStateRequested();
void restoreStateRequested();
void expandBranchesRequested(const QString &revision);
void reloaderChanged(DiffEditorReloader *reloader);
......
......@@ -46,6 +46,7 @@ DiffEditorDocument::DiffEditorDocument() :
m_controller(new DiffEditorController(this))
{
setId(Constants::DIFF_EDITOR_ID);
setMimeType(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
setTemporary(true);
}
......
......@@ -132,7 +132,9 @@ void SimpleDiffEditorReloader::reload()
QList<FileData> fileDataList;
fileDataList << fileData;
controller()->requestSaveState();
controller()->setDiffFiles(fileDataList);
controller()->requestRestoreState();
reloadFinished();