diff --git a/bin/qtcreator b/bin/qtcreator
index bf2b18b98965b5a654c22449f515dc0c92aee72a..d00cfa0f582d6b4d6bc175fc516259f7a2b7505b 100755
--- a/bin/qtcreator
+++ b/bin/qtcreator
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-bindir=$(dirname "$0")
+bindir=$(dirname $(readlink -nf $0))
 if test "$(uname -m)" = "x86_64" ; then
     libdir=$(cd ${bindir}/../lib64 ; pwd)
 else
diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp
index 74f629e15bcd1e6a3aedc07f425abe758c6e289b..9008ade31520ac23413a59b121d7b540acdd05ae 100644
--- a/src/libs/extensionsystem/pluginspec.cpp
+++ b/src/libs/extensionsystem/pluginspec.cpp
@@ -42,7 +42,8 @@
 #include <QtDebug>
 
 #ifdef Q_OS_LINUX
-#   define USE_UNPATCHED_QPLUGINLOADER 0
+// Using the patched version breaks on Fedora 10, KDE4.2.2/Qt4.5.
+#   define USE_UNPATCHED_QPLUGINLOADER 1
 #else
 #   define USE_UNPATCHED_QPLUGINLOADER 1
 #endif
diff --git a/src/libs/utils/process_stub.pro b/src/libs/utils/process_stub.pro
index a7f48846a4fdf4b3294c17409f45238621aafefd..996aecea91a5a7af32951c3de2047b18aece07f0 100644
--- a/src/libs/utils/process_stub.pro
+++ b/src/libs/utils/process_stub.pro
@@ -24,3 +24,5 @@ unix {
     LIBS += -lshell32
 }
 
+target.path  = /bin
+INSTALLS    += target
diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp
index 4b7ac701bf73b8077d60dc9e2717201de9f0d54f..cf2066c7909ac6d7a320e771dbc6a4e976218b18 100644
--- a/src/plugins/debugger/debuggermanager.cpp
+++ b/src/plugins/debugger/debuggermanager.cpp
@@ -278,7 +278,7 @@ void DebuggerManager::init()
     connect(m_watchHandler, SIGNAL(setSessionValueRequested(QString,QVariant)),
         this, SIGNAL(setSessionValueRequested(QString,QVariant)));
     connect(theDebuggerAction(AssignValue), SIGNAL(triggered()),
-        this, SLOT(assignValueInDebugger()));
+        this, SLOT(assignValueInDebugger()), Qt::QueuedConnection);
 
     // Tooltip
     QTreeView *tooltipView = qobject_cast<QTreeView *>(m_tooltipWindow);
diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index 2a82bbda4cf315a0e2bd7b558a50138daf3a7055..ec552df2fbffdf12e2ba00298c12a58709cec832 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -377,18 +377,18 @@ void GdbEngine::handleResponse(const QByteArray &buff)
             GdbMi record;
             while (from != to) {
                 GdbMi data;
-                if (*from == ',') {
-                    ++from; // skip ','
-                    data.parseResultOrValue(from, to);
-                    if (data.isValid()) {
-                        //qDebug() << "parsed response: " << data.toString();
-                        record.m_children += data;
-                        record.m_type = GdbMi::Tuple;
-                    }
-                } else {
+                if (*from != ',') {
                     // happens on archer where we get 
                     // 23^running <NL> *running,thread-id="all" <NL> (gdb) 
                     record.m_type = GdbMi::Tuple;
+                    break;
+                }
+                ++from; // skip ','
+                data.parseResultOrValue(from, to);
+                if (data.isValid()) {
+                    //qDebug() << "parsed response: " << data.toString();
+                    record.m_children += data;
+                    record.m_type = GdbMi::Tuple;
                 }
             }
             if (asyncClass == "stopped") {
diff --git a/src/plugins/debugger/scriptengine.cpp b/src/plugins/debugger/scriptengine.cpp
index 75513042ee44fda93ff46a939e0617f282ac3b3f..413270bb67353f6f81b4b01dd898837572559d8c 100644
--- a/src/plugins/debugger/scriptengine.cpp
+++ b/src/plugins/debugger/scriptengine.cpp
@@ -69,6 +69,7 @@ using namespace Debugger::Constants;
 #else
 #   define SDEBUG(s)
 #endif
+# define XSDEBUG(s) qDebug() << s
 
 ///////////////////////////////////////////////////////////////////////
 //
@@ -194,7 +195,7 @@ ScriptEngine::~ScriptEngine()
 void ScriptEngine::executeDebuggerCommand(const QString &command)
 {
     Q_UNUSED(command);
-    SDEBUG("FIXME:  ScriptEngine::executeDebuggerCommand()");
+    XSDEBUG("FIXME:  ScriptEngine::executeDebuggerCommand()");
 }
 
 void ScriptEngine::shutdown()
@@ -247,40 +248,40 @@ void ScriptEngine::interruptInferior()
 {
     m_stopped = false;
     m_stopOnNextLine = true;
-    SDEBUG("FIXME:  ScriptEngine::interruptInferior()");
+    XSDEBUG("ScriptEngine::interruptInferior()");
 }
 
 void ScriptEngine::stepExec()
 {
-    //SDEBUG("FIXME:  ScriptEngine::stepExec()");
+    //SDEBUG("ScriptEngine::stepExec()");
     m_stopped = false;
     m_stopOnNextLine = true;
 }
 
 void ScriptEngine::stepIExec()
 {
-    //SDEBUG("FIXME:  ScriptEngine::stepIExec()");
+    //SDEBUG("ScriptEngine::stepIExec()");
     m_stopped = false;
     m_stopOnNextLine = true;
 }
 
 void ScriptEngine::stepOutExec()
 {
-    //SDEBUG("FIXME:  ScriptEngine::stepOutExec()");
+    //SDEBUG("ScriptEngine::stepOutExec()");
     m_stopped = false;
     m_stopOnNextLine = true;
 }
 
 void ScriptEngine::nextExec()
 {
-    //SDEBUG("FIXME:  ScriptEngine::nextExec()");
+    //SDEBUG("ScriptEngine::nextExec()");
     m_stopped = false;
     m_stopOnNextLine = true;
 }
 
 void ScriptEngine::nextIExec()
 {
-    //SDEBUG("FIXME:  ScriptEngine::nextIExec()");
+    //SDEBUG("ScriptEngine::nextIExec()");
     m_stopped = false;
     m_stopOnNextLine = true;
 }
@@ -295,14 +296,14 @@ void ScriptEngine::runToLineExec(const QString &fileName, int lineNumber)
 void ScriptEngine::runToFunctionExec(const QString &functionName)
 {
     Q_UNUSED(functionName);
-    SDEBUG("FIXME:  ScriptEngine::runToFunctionExec()");
+    XSDEBUG("FIXME:  ScriptEngine::runToFunctionExec()");
 }
 
 void ScriptEngine::jumpToLineExec(const QString &fileName, int lineNumber)
 {
     Q_UNUSED(fileName);
     Q_UNUSED(lineNumber);
-    SDEBUG("FIXME:  ScriptEngine::jumpToLineExec()");
+    XSDEBUG("FIXME:  ScriptEngine::jumpToLineExec()");
 }
 
 void ScriptEngine::activateFrame(int index)
@@ -468,8 +469,9 @@ void ScriptEngine::setToolTipExpression(const QPoint &pos, const QString &exp0)
 void ScriptEngine::assignValueInDebugger(const QString &expression,
     const QString &value)
 {
-    Q_UNUSED(expression);
-    Q_UNUSED(value);
+    XSDEBUG("ASSIGNING: " << expression + '=' + value);
+    m_scriptEngine->evaluate(expression + '=' + value);
+    updateLocals();
 }
 
 void ScriptEngine::maybeBreakNow(bool byFunction)
@@ -521,7 +523,12 @@ void ScriptEngine::maybeBreakNow(bool byFunction)
 
     qq->notifyInferiorStopped();
     q->gotoLocation(fileName, lineNumber, true);
+    updateLocals();
+}
 
+void ScriptEngine::updateLocals()
+{
+    QScriptContext *context = m_scriptEngine->currentContext();
     qq->watchHandler()->reinitializeWatchers();
     //SDEBUG("UPDATE LOCALS");
 
@@ -647,6 +654,7 @@ void ScriptEngine::updateSubItem(const WatchData &data0)
             it.next();
             WatchData data1;
             data1.iname = data.iname + "." + it.name();
+            data1.exp = it.name();
             data1.name = it.name();
             data1.scriptValue = it.value();
             if (qq->watchHandler()->isExpandedIName(data1.iname))
diff --git a/src/plugins/debugger/scriptengine.h b/src/plugins/debugger/scriptengine.h
index 33e102e750f7dbe1049a82a58f77ee24b9da270b..5e009327da7f63054ac4a551177cc59157385560 100644
--- a/src/plugins/debugger/scriptengine.h
+++ b/src/plugins/debugger/scriptengine.h
@@ -110,6 +110,7 @@ private:
     bool supportsThreads() const { return true; }
     void maybeBreakNow(bool byFunction);
     void updateWatchModel();
+    void updateLocals();
     void updateSubItem(const WatchData &data0);
 
 private:
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 76d27768e19acad7f750ae8f60095593e2f0fcc8..b618b98c55df4d6437addae36b7fb9433c30d7ae 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -493,6 +493,14 @@ QVariant WatchHandler::data(const QModelIndex &idx, int role) const
     return QVariant();
 }
 
+bool WatchHandler::setData(const QModelIndex &index, const QVariant &value, int role)
+{
+    Q_UNUSED(role);
+    Q_UNUSED(value);
+    emit dataChanged(index, index);
+    return true;
+}
+
 Qt::ItemFlags WatchHandler::flags(const QModelIndex &idx) const
 {
     using namespace Qt;
diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h
index ba6bb64dd1b646c32d1b618331d622523ea16bd7..3f773ac1df37923c8ea6f525654d88d98b9fb4c9 100644
--- a/src/plugins/debugger/watchhandler.h
+++ b/src/plugins/debugger/watchhandler.h
@@ -149,6 +149,7 @@ public:
     //  QAbstractItemModel
     //
     QVariant data(const QModelIndex &index, int role) const;
+    bool setData(const QModelIndex &index, const QVariant &value, int role);
     QModelIndex index(int, int, const QModelIndex &idx) const;
     QModelIndex parent(const QModelIndex &idx) const;
     int rowCount(const QModelIndex &idx) const;
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 77f09f792080420df0283325c47a25ce5a6282f4..a4d65d6280b207539e5c9cd02a5a982c3e2a6263 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -64,6 +64,7 @@ public:
     QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &,
         const QModelIndex &) const
     {
+        qDebug() << "CREATE EDITOR";
         return new QLineEdit(parent);
     }
 
@@ -77,13 +78,15 @@ public:
             lineEdit->setText(index.model()->data(index, ExpressionRole).toString());
     }
 
-    void setModelData(QWidget *editor, QAbstractItemModel *,
+    void setModelData(QWidget *editor, QAbstractItemModel *model,
         const QModelIndex &index) const
     {
+        //qDebug() << "SET MODEL DATA";
         QLineEdit *lineEdit = qobject_cast<QLineEdit*>(editor);
         QTC_ASSERT(lineEdit, return);
         QString value = lineEdit->text();
-        QString exp = index.model()->data(index, ExpressionRole).toString();
+        QString exp = model->data(index, ExpressionRole).toString();
+        model->setData(index, value, Qt::EditRole);
         if (index.column() == 1) {
             // the value column
             theDebuggerAction(AssignValue)->trigger(exp + '=' + value);
@@ -147,7 +150,9 @@ void WatchWindow::keyPressEvent(QKeyEvent *ev)
         QModelIndex idx1 = idx.sibling(idx.row(), 0);
         QString exp = model()->data(idx1).toString();
         theDebuggerAction(RemoveWatchExpression)->trigger(exp);
-    } else if (ev->key() == Qt::Key_Return && m_type == LocalsType) {
+    } else if (ev->key() == Qt::Key_Return
+            && ev->modifiers() == Qt::ControlModifier
+            && m_type == LocalsType) {
         QModelIndex idx = currentIndex();
         QModelIndex idx1 = idx.sibling(idx.row(), 0);
         QString exp = model()->data(idx1).toString();
@@ -264,4 +269,3 @@ void WatchWindow::resetHelper(const QModelIndex &idx)
         collapse(idx);
     }
 }
-
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index eba4226c704fbf4be032b7ca687843d51b14ec57..a716fed9e2b1b18b7dc7ee18ec61bb1f10b9a8a5 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -1424,7 +1424,7 @@ QString QtVersion::buildDebuggingHelperLibrary()
         qmake.setWorkingDirectory(directory);
         qmake.setProcessChannelMode(QProcess::MergedChannels);
 
-        qmake.start(qmakeCommand(), QStringList()<<"-spec"<<"default"<<"gdbmacros.pro");
+        qmake.start(qmakeCommand(), QStringList()<<"-spec"<< mkspec() <<"gdbmacros.pro");
         qmake.waitForFinished();
 
         output += qmake.readAll();
diff --git a/src/plugins/qtscripteditor/parser/javascriptengine_p.cpp b/src/plugins/qtscripteditor/parser/javascriptengine_p.cpp
index 050f1d1bbed22bc7658ac933e67d0d559cde227a..116c12ee884d6b4730ac1504c174a72fe3064a54 100644
--- a/src/plugins/qtscripteditor/parser/javascriptengine_p.cpp
+++ b/src/plugins/qtscripteditor/parser/javascriptengine_p.cpp
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact:  Qt Software Information (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+**
+**************************************************************************/
+
 #include "javascriptengine_p.h"
 #include "javascriptnodepool_p.h"
 #include "javascriptvalue.h"
@@ -10,17 +39,17 @@ namespace JavaScript {
 
 int Ecma::RegExp::flagFromChar(const QChar &ch)
 {
-  static QHash<QChar, int> flagsHash;
-  if (flagsHash.isEmpty()) {
-      flagsHash[QLatin1Char('g')] = Global;
-      flagsHash[QLatin1Char('i')] = IgnoreCase;
-      flagsHash[QLatin1Char('m')] = Multiline;
-  }
-  QHash<QChar, int>::const_iterator it;
-  it = flagsHash.constFind(ch);
-  if (it == flagsHash.constEnd())
-      return 0;
-  return it.value();
+    static QHash<QChar, int> flagsHash;
+    if (flagsHash.isEmpty()) {
+        flagsHash[QLatin1Char('g')] = Global;
+        flagsHash[QLatin1Char('i')] = IgnoreCase;
+        flagsHash[QLatin1Char('m')] = Multiline;
+    }
+    QHash<QChar, int>::const_iterator it;
+    it = flagsHash.constFind(ch);
+    if (it == flagsHash.constEnd())
+        return 0;
+    return it.value();
 }
 
 
@@ -35,8 +64,8 @@ NodePool::~NodePool()
 
 Code *NodePool::createCompiledCode(AST::Node *, CompilationUnit &)
 {
-  Q_ASSERT(0);
-  return 0;
+    Q_ASSERT(0);
+    return 0;
 }
 
 static int toDigit(char c)
diff --git a/src/plugins/qtscripteditor/parser/javascriptengine_p.h b/src/plugins/qtscripteditor/parser/javascriptengine_p.h
index 480ef042a70595818773e7fdc271645b3cdcc592..9072f410378eee91355c5b1f8987bb537d39020c 100644
--- a/src/plugins/qtscripteditor/parser/javascriptengine_p.h
+++ b/src/plugins/qtscripteditor/parser/javascriptengine_p.h
@@ -1,3 +1,32 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact:  Qt Software Information (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+**
+**************************************************************************/
+
 #ifndef JAVASCRIPTENGINE_P_H
 #define JAVASCRIPTENGINE_P_H
 
@@ -42,24 +71,24 @@ public:
 
 class JavaScriptNameIdImpl
 {
-  QString _text;
+    QString _text;
 
 public:
-  JavaScriptNameIdImpl(const QChar *u, int s)
-    : _text(u, s)
-  { }
+    JavaScriptNameIdImpl(const QChar *u, int s)
+        : _text(u, s)
+    { }
 
-  const QString asString() const
-  { return _text; }
+    const QString asString() const
+    { return _text; }
 
-  bool operator == (const JavaScriptNameIdImpl &other) const
-  { return _text == other._text; }
+    bool operator == (const JavaScriptNameIdImpl &other) const
+    { return _text == other._text; }
 
-  bool operator != (const JavaScriptNameIdImpl &other) const
-  { return _text != other._text; }
+    bool operator != (const JavaScriptNameIdImpl &other) const
+    { return _text != other._text; }
 
-  bool operator < (const JavaScriptNameIdImpl &other) const
-  { return _text < other._text; }
+    bool operator < (const JavaScriptNameIdImpl &other) const
+    { return _text < other._text; }
 };
 
 inline uint qHash(const JavaScriptNameIdImpl &id)
@@ -67,43 +96,43 @@ inline uint qHash(const JavaScriptNameIdImpl &id)
 
 class JavaScriptEnginePrivate
 {
-  JavaScript::Lexer *_lexer;
-  JavaScript::NodePool *_nodePool;
-  JavaScript::AST::Node *_ast;
-  QSet<JavaScriptNameIdImpl> _literals;
+    JavaScript::Lexer *_lexer;
+    JavaScript::NodePool *_nodePool;
+    JavaScript::AST::Node *_ast;
+    QSet<JavaScriptNameIdImpl> _literals;
 
 public:
-  JavaScriptEnginePrivate()
-    : _lexer(0), _nodePool(0), _ast(0)
-  { }
+    JavaScriptEnginePrivate()
+        : _lexer(0), _nodePool(0), _ast(0)
+    { }
 
-  QSet<JavaScriptNameIdImpl> literals() const
-  { return _literals; }
+    QSet<JavaScriptNameIdImpl> literals() const
+    { return _literals; }
 
-  JavaScriptNameIdImpl *intern(const QChar *u, int s)
-  { return const_cast<JavaScriptNameIdImpl *>(&*_literals.insert(JavaScriptNameIdImpl(u, s))); }
+    JavaScriptNameIdImpl *intern(const QChar *u, int s)
+    { return const_cast<JavaScriptNameIdImpl *>(&*_literals.insert(JavaScriptNameIdImpl(u, s))); }
 
-  JavaScript::Lexer *lexer() const
-  { return _lexer; }
+    JavaScript::Lexer *lexer() const
+    { return _lexer; }
 
-  void setLexer(JavaScript::Lexer *lexer)
-  { _lexer = lexer; }
+    void setLexer(JavaScript::Lexer *lexer)
+    { _lexer = lexer; }
 
-  JavaScript::NodePool *nodePool() const
-  { return _nodePool; }
+    JavaScript::NodePool *nodePool() const
+    { return _nodePool; }
 
-  void setNodePool(JavaScript::NodePool *nodePool)
-  { _nodePool = nodePool; }
+    void setNodePool(JavaScript::NodePool *nodePool)
+    { _nodePool = nodePool; }
 
-  JavaScript::AST::Node *ast() const
-  { return _ast; }
+    JavaScript::AST::Node *ast() const
+    { return _ast; }
 
-  JavaScript::AST::Node *changeAbstractSyntaxTree(JavaScript::AST::Node *node)
-  {
-    JavaScript::AST::Node *previousAST = _ast;
-    _ast = node;
-    return previousAST;
-  }
+    JavaScript::AST::Node *changeAbstractSyntaxTree(JavaScript::AST::Node *node)
+    {
+        JavaScript::AST::Node *previousAST = _ast;
+        _ast = node;
+        return previousAST;
+    }
 };
 
 QT_END_NAMESPACE
diff --git a/tests/manual/gdbdebugger/script/math.js b/tests/manual/gdbdebugger/script/math.js
index 65adac96c68324de4df5981c0a644595f8a30ecf..240a0f078d502c399852a23ce35e360ab5ef687b 100644
--- a/tests/manual/gdbdebugger/script/math.js
+++ b/tests/manual/gdbdebugger/script/math.js
@@ -29,7 +29,8 @@
 
 function cube(a)
 {
-    return a * a * a;
+    var x = a * a * a;
+    return x;
 }
 
 var a = cube(3);
diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp
index d50180c4ad2fc60fee3e15b04e8a7b58f69c7878..3cdc0518db6c994bef9a3f29dfd268bc2ccc9e2a 100644
--- a/tests/manual/gdbdebugger/simple/app.cpp
+++ b/tests/manual/gdbdebugger/simple/app.cpp
@@ -39,6 +39,7 @@
 #include <QtCore/QThread>
 #include <QtCore/QVariant>
 #include <QtCore/QVector>
+#include <QtCore/QSharedPointer>
 
 #include <QtGui/QApplication>
 #include <QtGui/QAction>
@@ -493,6 +494,11 @@ void testQSet()
     //hash.insert(ptr);
 }
 
+
+void testQSharedPointer()
+{
+}
+
 void stringRefTest(const QString &refstring)
 {
     Q_UNUSED(refstring);