Commit dd45277a authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

Merge remote branch 'origin/2.1'

Conflicts:
	share/qtcreator/templates/qmlapp/app.pro
	src/plugins/plugins.pro
	src/plugins/qt4projectmanager/qt4project.h
	src/plugins/qt4projectmanager/qt4projectmanager_dependencies.pri
parents d6d7b97a f4ac36b4
#!/bin/bash
## Command line parameters
if [[ $# != 1 ]]; then
if [[ $# != 2 ]]; then
cat <<USAGE
usage:
$0 <branch>
$0 <branch> <version>
Creates tar and zip source package from origin/<branch> and documentation-zip from current checkout.
Files and directories are named after <branch>.
Files and directories are named after <version>.
example:
$0 2.0.0
$0 2.0.0 2.0.0-rc1
USAGE
exit 1
fi
VERSION=$1
BRANCH=$1
VERSION=$2
cd `dirname $0`/..
echo "Creating tar archive..."
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ origin/${VERSION} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ origin/${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
echo "Creating zip archive..."
git archive --format=zip --prefix=qt-creator-${VERSION}-src/ origin/${VERSION} > qt-creator-${VERSION}-src.zip || exit 1
git archive --format=zip --prefix=qt-creator-${VERSION}-src/ origin/${BRANCH} > qt-creator-${VERSION}-src.zip || exit 1
echo "Creating documentation..."
rm -r doc/html
qmake -r && make docs_online || exit 1
......
......@@ -491,9 +491,12 @@ def listOfLocals(varList):
item = Item(0, "local", name, name)
try:
item.value = frame.read_var(name) # this is a gdb value
except RuntimeError:
# happens for void foo() { std::string s; std::wstring w; }
#warn(" FRAME READ VAR ERROR: %s (%s): " % (symbol, name))
except:
# RuntimeError: happens for
# void foo() { std::string s; std::wstring w; }
# ValueError: happens for (as of 2010/11/4)
# a local struct as found e.g. in
# gcc sources in gcc.c, int execute()
continue
#warn("ITEM %s: " % item.value)
items.append(item)
......
......@@ -59,6 +59,10 @@ class QMLJSDEBUGGER_EXTERN QDeclarativeDebugHelper
public:
static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine);
static void setAnimationSlowDownFactor(qreal factor);
// Enables remote debugging functionality
// Only use this for debugging in a safe environment!
static void enableDebugging();
};
QT_END_NAMESPACE
......
......@@ -50,6 +50,7 @@
#include <QDebug>
#include <QMessageBox>
#include "qdeclarativetester.h"
#include "private/qdeclarativedebughelper_p.h"
QT_USE_NAMESPACE
......@@ -361,6 +362,9 @@ int main(int argc, char ** argv)
if (stayOnTop)
wflags |= Qt::WindowStaysOnTopHint;
// enable remote debugging
QDeclarativeDebugHelper::enableDebugging();
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
viewer->setAttribute(Qt::WA_DeleteOnClose, true);
if (!scriptopts.isEmpty()) {
......
......@@ -63,7 +63,7 @@ GroupBox {
alignRight: false
spacing: 4
singleStep: 1;
enabled: !anchorBackend.rightAnchored && !anchorBackend.horizontalCentered
enabled: !(anchorBackend.rightAnchored && anchorBackend.leftAnchored)
backendValue: backendValues.width
minimum: -2000;
maximum: 2000;
......@@ -76,7 +76,7 @@ GroupBox {
alignRight: false
spacing: 4
singleStep: 1;
enabled: !anchorBackend.bottomAnchored && !anchorBackend.verticalCentered
enabled: !(anchorBackend.bottomAnchored && anchorBackend.topAnchored)
backendValue: backendValues.height
minimum: -2000;
maximum: 2000;
......
......@@ -27,7 +27,7 @@ symbian:TARGET.UID3 = 0xE1111234
# and 0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
# Define QMLJSDEBUGGER to allow debugging of QML
# Define QMLJSDEBUGGER to allow debugging of QML in debug builds
# (This might significantly increase build time)
# DEFINES += QMLJSDEBUGGER
......
......@@ -16,6 +16,10 @@
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
#if defined(QMLJSDEBUGGER)
#include <qt_private/qdeclarativedebughelper_p.h>
#endif
#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
#include <jsdebuggeragent.h>
#endif
......@@ -30,6 +34,22 @@
#include <aknappui.h>
#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
#if defined(QMLJSDEBUGGER)
// Enable debugging before any QDeclarativeEngine is created
struct QmlJsDebuggingEnabler
{
QmlJsDebuggingEnabler()
{
QDeclarativeDebugHelper::enableDebugging();
}
};
// Execute code in constructor before first QDeclarativeEngine is instantiated
static QmlJsDebuggingEnabler enableDebuggingHelper;
#endif // QMLJSDEBUGGER
class QmlApplicationViewerPrivate
{
QString mainQmlFile;
......
......@@ -33,21 +33,21 @@ defineTest(minQtVersion) {
contains(DEFINES, QMLJSDEBUGGER) {
CONFIG(debug, debug|release) {
!minQtVersion(4, 7, 1) {
warning()
warning("Disabling QML debugging:")
warning()
warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
warning("This library requires Qt 4.7.1 or newer.")
warning()
error("Qt version $$QT_VERSION too old for QmlJS Debugging. Aborting.")
}
isEmpty(QMLJSDEBUGGER_PATH) {
DEFINES -= QMLJSDEBUGGER
} else:isEmpty(QMLJSDEBUGGER_PATH) {
warning()
warning("Disabling QML debugging:")
warning()
warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
warning("Please specify its location on the qmake command line, eg")
warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
warning()
error("QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.")
DEFINES -= QMLJSDEBUGGER
} else {
include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>230</width>
<height>100</height>
<width>233</width>
<height>94</height>
</rect>
</property>
<property name="windowTitle">
......@@ -36,7 +36,7 @@
<widget class="QFontComboBox" name="fontComboBox">
<property name="maximumSize">
<size>
<width>120</width>
<width>140</width>
<height>16777215</height>
</size>
</property>
......@@ -45,10 +45,16 @@
<item row="1" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
<number>4</number>
</property>
<item>
<widget class="QToolButton" name="boldButton">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
......@@ -65,6 +71,12 @@
</item>
<item>
<widget class="QToolButton" name="italicButton">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
......@@ -81,6 +93,12 @@
</item>
<item>
<widget class="QToolButton" name="underlineButton">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
......@@ -97,6 +115,12 @@
</item>
<item>
<widget class="QToolButton" name="strikeoutButton">
<property name="minimumSize">
<size>
<width>30</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
......@@ -125,7 +149,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
<number>4</number>
</property>
<item>
<widget class="QToolButton" name="leftAlignmentButton">
......@@ -232,7 +256,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
<number>4</number>
</property>
<item>
<widget class="QToolButton" name="topAlignmentButton">
......@@ -310,7 +334,7 @@
<widget class="QComboBox" name="styleComboBox">
<property name="maximumSize">
<size>
<width>70</width>
<width>90</width>
<height>16777215</height>
</size>
</property>
......
......@@ -165,6 +165,20 @@ void DragWidget::protectedMoved()
}
void DragWidget::leaveEvent(QEvent *)
{
#ifdef Q_WS_MAC
unsetCursor();
#endif
}
void DragWidget::enterEvent(QEvent *)
{
#ifdef Q_WS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_currentWidget(0)
{
QGridLayout *layout = new QGridLayout(this);
......@@ -208,6 +222,9 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu
m_disableAction->setCheckable(true);
connect(m_disableAction.data(), SIGNAL(toggled(bool)), this, SLOT(onDisable(bool)));
m_pinned = false;
#ifdef Q_WS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
ContextPaneWidget::~ContextPaneWidget()
......
......@@ -64,6 +64,8 @@ protected:
void mouseReleaseEvent(QMouseEvent * event);
void mouseMoveEvent(QMouseEvent * event);
void virtual protectedMoved();
void leaveEvent(QEvent *);
void enterEvent(QEvent *);
private:
QGraphicsDropShadowEffect *m_dropShadowEffect;
......
......@@ -177,4 +177,19 @@ void CustomColorDialog::setupWidgets()
m_blockUpdate = false;
}
void CustomColorDialog::leaveEvent(QEvent *)
{
#ifdef Q_WS_MAC
unsetCursor();
#endif
}
void CustomColorDialog::enterEvent(QEvent *)
{
#ifdef Q_WS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
} //QmlEditorWidgets
......@@ -89,6 +89,8 @@ signals:
protected:
void setupWidgets();
void leaveEvent(QEvent *);
void enterEvent(QEvent *);
private:
QFrame *m_beforeColorWidget;
......
......@@ -203,9 +203,10 @@ Snapshot::Snapshot()
void Snapshot::reset()
{
for (Memory::Iterator it = memory.begin(); it != memory.end(); ++it) {
for (Memory::Iterator it = memory.begin(); it != memory.end(); ) {
if (isReadOnly(it.key())) {
MEMORY_DEBUG("KEEPING READ-ONLY RANGE" << it.key());
++it;
} else {
it = memory.erase(it);
}
......
......@@ -299,8 +299,16 @@ void NavigatorTreeModel::handleChangedItem(QStandardItem *item)
ItemRow itemRow = itemRowForNode(node);
if (item == itemRow.idItem) {
if (node.isValidId(item->text())) {
if (node.view()->rewriterView())
node.view()->rewriterView()->renameId(node.id(), item->text());
if (node.id().isEmpty() || item->text().isEmpty()) { //no id
try {
node.setId(item->text());
} catch (InvalidIdException &e) { //better save then sorry
QMessageBox::warning(0, tr("Invalid Id"), e.description());
}
} else { //there is already an id, so we refactor
if (node.view()->rewriterView())
node.view()->rewriterView()->renameId(node.id(), item->text());
}
} else {
QMessageBox::warning(0, tr("Invalid Id"), tr("%1 is an invalid id").arg(item->text()));
item->setText(node.id());
......
......@@ -356,8 +356,16 @@ void PropertyEditor::changeValue(const QString &propertyName)
const QString newId = value->value().toString();
if (m_selectedNode.isValidId(newId)) {
if (rewriterView())
rewriterView()->renameId(m_selectedNode.id(), newId);
if (m_selectedNode.id().isEmpty() || newId.isEmpty()) { //no id
try {
m_selectedNode.setId(newId);
} catch (InvalidIdException &e) { //better save then sorry
QMessageBox::warning(0, tr("Invalid Id"), e.description());
}
} else { //there is already an id, so we refactor
if (rewriterView())
rewriterView()->renameId(m_selectedNode.id(), newId);
}
} else {
value->setValue(m_selectedNode.id());
QMessageBox::warning(0, tr("Invalid Id"), tr("%1 is an invalid id").arg(newId));
......
......@@ -301,8 +301,10 @@ void QmlAnchorBindingProxy::setBottomAnchor(bool anchor)
removeBottomAnchor();
} else {
calcBottomMargin();
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "height", m_fxItemNode.instanceSize().height());
m_fxItemNode.removeVariantProperty("height");
if (topAnchored()) {
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "height", m_fxItemNode.instanceSize().height());
m_fxItemNode.removeVariantProperty("height");
}
}
emit bottomAnchorChanged();
......@@ -326,6 +328,10 @@ void QmlAnchorBindingProxy::setLeftAnchor(bool anchor)
calcLeftMargin();
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "x", m_fxItemNode.instancePosition().x());
m_fxItemNode.removeVariantProperty("x");
if (rightAnchored()) {
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "width", m_fxItemNode.instanceSize().width());
m_fxItemNode.removeVariantProperty("width");
}
}
emit leftAnchorChanged();
if (hasAnchors() != anchor)
......@@ -346,8 +352,10 @@ void QmlAnchorBindingProxy::setRightAnchor(bool anchor)
removeRightAnchor();
} else {
calcRightMargin();
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "width", m_fxItemNode.instanceSize().width());
m_fxItemNode.removeVariantProperty("width");
if (leftAnchored()) {
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "width", m_fxItemNode.instanceSize().width());
m_fxItemNode.removeVariantProperty("width");
}
}
emit rightAnchorChanged();
if (hasAnchors() != anchor)
......@@ -400,7 +408,7 @@ void QmlAnchorBindingProxy::calcBottomMargin()
m_fxItemNode.anchors().setMargin( AnchorLine::Bottom, bottomMargin);
m_fxItemNode.anchors().setAnchor(AnchorLine::Bottom, m_bottomTarget, AnchorLine::Bottom);
} else {
qreal bottomMargin = boundingBox(m_fxItemNode).bottom() - boundingBox(m_rightTarget).top();
qreal bottomMargin = boundingBox(m_bottomTarget).top()- boundingBox(m_fxItemNode).bottom();
m_fxItemNode.anchors().setMargin( AnchorLine::Bottom, bottomMargin);
m_fxItemNode.anchors().setAnchor(AnchorLine::Bottom, m_bottomTarget, AnchorLine::Top);
}
......@@ -458,6 +466,10 @@ void QmlAnchorBindingProxy::setTopAnchor(bool anchor)
calcTopMargin();
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "y", m_fxItemNode.instancePosition().y());
m_fxItemNode.removeVariantProperty("y");
if (bottomAnchored()) {
m_fxItemNode.modelNode().setAuxiliaryData(auxDataString + "height", m_fxItemNode.instanceSize().height());
m_fxItemNode.removeVariantProperty("height");
}
}
emit topAnchorChanged();
if (hasAnchors() != anchor)
......@@ -472,6 +484,8 @@ void QmlAnchorBindingProxy::removeTopAnchor() {
if (qFuzzyCompare(m_fxItemNode.instancePosition().y(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "y"))
m_fxItemNode.setVariantProperty("y", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "y"));
if (qFuzzyCompare(m_fxItemNode.instanceSize().height(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "height"))
m_fxItemNode.setVariantProperty("height", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "height"));
}
......@@ -493,6 +507,8 @@ void QmlAnchorBindingProxy::removeLeftAnchor() {
if (qFuzzyCompare(m_fxItemNode.instancePosition().x(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "x"))
m_fxItemNode.setVariantProperty("x", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "x"));
if (qFuzzyCompare(m_fxItemNode.instanceSize().width(), 0.0) && m_fxItemNode.modelNode().hasAuxiliaryData(auxDataString + "width"))
m_fxItemNode.setVariantProperty("width", m_fxItemNode.modelNode().auxiliaryData(auxDataString + "width"));
}
void QmlAnchorBindingProxy::removeRightAnchor() {
......
......@@ -719,6 +719,7 @@ void Qt4PriFileNode::folderChanged(const QString &folder)
}
contents.updateSubFolders(this, this);
m_project->updateFileList();
}
bool Qt4PriFileNode::deploysFolder(const QString &folder) const
......
......@@ -193,6 +193,8 @@ public:
Internal::CentralizedFolderWatcher *centralizedFolderWatcher();
// For Qt4ProFileNode after a on disk change
void updateFileList();
signals:
void proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *node, bool);
......@@ -222,7 +224,7 @@ private:
void updateCodeModels();
void updateCppCodeModel();
void updateQmlJSCodeModel();
void updateFileList();
static void collectLeafProFiles(QList<Internal::Qt4ProFileNode *> &list, Internal::Qt4ProFileNode *node);
static void collectApplicationProFiles(QList<Internal::Qt4ProFileNode *> &list, Internal::Qt4ProFileNode *node);
......
include(../../plugins/projectexplorer/projectexplorer.pri)
include(../../plugins/cpptools/cpptools.pri)
include(../../plugins/qmljseditor/qmljseditor.pri)
include(../../plugins/designer/designer.pri)
include(../../plugins/debugger/debugger.pri)
include(../../libs/symbianutils/symbianutils.pri)
include(../../libs/qmljs/qmljs.pri)
......@@ -477,7 +477,7 @@ bool QmlStandaloneApp::updateFiles(const QList<QmlAppGeneratedFileInfo> &list, Q
return true;
}
const int QmlStandaloneApp::StubVersion = 9;
const int QmlStandaloneApp::StubVersion = 10;
} // namespace Internal
} // namespace Qt4ProjectManager
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment