...
 
Commits (73)
......@@ -48,9 +48,12 @@ Project support
* The qmake step is a lot smarter and tries harder to not run
* By default projects using the Microsoft Visual Studio toolchain use jom
instead of nmake, for better utilization of all processors.
* Show subdirectory structure below .pro/.pri files in project tree
* Add "Show file in Finder/Explorer" (Mac/Windows) to context menu.
On Linux it opens the containing directory.
Compilation
* Support distributed compilation on Windows/MSVC via jom
* Support multi-core compilation on Windows/MSVC via jom
(see http://qt.gitorious.org/qt-labs/jom/)
Debugging
......
unix:QDOC_BIN = $$(QTDIR)/bin/qdoc3
win32:QDOC_BIN = $$(QTDIR)/bin/qdoc3.exe
win32:QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")
# legacy branch, can be dropped as soon as we depend on Qt 4.6
!exists( $$QDOC_BIN ) {
unix:QDOC_BIN = $$(QTDIR)/tools/qdoc3/qdoc3
win32 {
QDOC_BIN = $$(QTDIR)/tools/qdoc3/release/qdoc3.exe
QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")
!exists( $$QDOC_BIN ) {
QDOC_BIN = $$(QTDIR)/tools/qdoc3/debug/qdoc3.exe
QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")
}
}
}
unix {
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$(QTDIR)/tools/qdoc3/qdoc3
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$QDOC_BIN
HELPGENERATOR = $$(QTDIR)/bin/qhelpgenerator
} else {
QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$(QTDIR)\tools\qdoc3\release\qdoc3.exe
QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$QDOC_BIN
HELPGENERATOR = $$(QTDIR)\bin\qhelpgenerator.exe
}
......
......@@ -5,7 +5,7 @@
\title Qt Creator Manual
\section1 Version 1.2.80
\section1 Version 1.2.90
The goal of Qt Creator is to provide a cross-platform, complete Integrated
Development Environment (IDE) to develop Qt projects. It is available for
......@@ -1454,8 +1454,8 @@
system.
This feature lets you use Qt Creator as a code editor. You can change the
way your project is built by modifying the \c make command on the
\gui{Project Settings} page.
way your project is built by modifying the \c make command under
\gui{Build Settings} in the \gui{Projects} mode.
For a generic project, you have to manually specify which files belong to
your project and which include directories/defines you want to pass to your
......@@ -1468,7 +1468,8 @@
file. When you first create a generic project, Qt Creator will add any
files it recognizes to your project. To add or remove files later, simply
edit the \c{.files} file in Qt Creator. Your project tree will be refreshed
when you save this file.
when you save this file. You can also add or remove files using the context
menu in the project tree.
If you frequently need to update the \c{.files} file, we recommend the use
of a small script that will update the files for you. Currently, if the
......@@ -1478,7 +1479,9 @@
\section2 Specifying Include Paths
The include paths are specified in the \c{.includes} file.
The include paths are specified in the \c{.includes} file, one include
path per line. The paths can be either absolute or relative to the
\c{.includes} file.
\section2 Specifying Defines
......@@ -1490,11 +1493,12 @@
#define NAME value
\endcode
\section2 Creating a Run Configuration
Qt Creator cannot automatically determine which executable it should run.
To set up a custom executable run configuration in the \gui Projects mode,
use the \bold{+} button. Here you can specify the name, executable, and
use the \bold{Add} button. Here you can specify the name, executable, and
some optional arguments. By default, the working directory is
\c{$BUILDDIR} which should work fine.
*/
......@@ -1782,7 +1786,7 @@
There are some known issues with Qt Creator.
The development team is aware of those, there is no need to report them as bug.
\section1 Known Issues of Version 1.2.80
\section1 Known Issues of Version 1.2.90
\list
\o Gdb on Windows may not work if the 'Embassy \reg Security Center' software
......
......@@ -18,15 +18,15 @@ sources.fileextensions = "qtcreator.qdoc addressbook-sdk.qdoc"
qhp.projects = QtCreator
qhp.QtCreator.file = qtcreator.qhp
qhp.QtCreator.namespace = com.nokia.qtcreator.1280
qhp.QtCreator.namespace = com.nokia.qtcreator.1290
qhp.QtCreator.virtualFolder = doc
qhp.QtCreator.indexTitle = Qt Creator
qhp.QtCreator.indexRoot =
qhp.QtCreator.extraFiles = classic.css \
images/qt-logo.png
qhp.QtCreator.filterAttributes = qtcreator 1.2.80
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 1.2.80
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 1.2.80
qhp.QtCreator.filterAttributes = qtcreator 1.2.90
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 1.2.90
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 1.2.90
# macros.qdocconf
......@@ -202,5 +202,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2009 Nokia</td>\n" \
"<td width=\"40%\" align=\"center\">&nbsp;</td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 1.2.80</div></td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 1.2.90</div></td>\n" \
"</tr></table></div></address>"
......@@ -1031,7 +1031,7 @@ static void qDumpQAbstractItem(QDumper &d)
//d.putItem("value", "(").put(rowCount).put(",").put(columnCount).put(")");
d.putItem("value", m->data(mi, Qt::DisplayRole).toString());
d.putItem("valueencoded", "2");
d.putItem("numchild", "1");
d.putItem("numchild", rowCount * columnCount);
if (d.dumpChildren) {
d.beginChildren();
for (int row = 0; row < rowCount; ++row) {
......@@ -1042,7 +1042,7 @@ static void qDumpQAbstractItem(QDumper &d)
d.put("[").put(row).put(",").put(column).put("]");
d.endItem();
//d.putItem("numchild", (m->hasChildren(child) ? "1" : "0"));
d.putItem("numchild", "1");
d.putItem("numchild", m->rowCount(child) * m->columnCount(child));
d.beginItem("addr");
d.put("$").put(child.row()).put(",").put(child.column()).put(",")
.put(child.internalPointer()).put(",").put(child.model());
......@@ -1104,7 +1104,7 @@ static void qDumpQAbstractItemModel(QDumper &d)
d.putItem("value", m.data(mi, Qt::DisplayRole).toString());
d.putItem("valueencoded", "2");
//d.putItem("numchild", (m.hasChildren(mi) ? "1" : "0"));
d.putItem("numchild", "1");
d.putItem("numchild", m.rowCount(mi) * m.columnCount(mi));
d.beginItem("addr");
d.put("$").put(mi.row()).put(",").put(mi.column()).put(",");
d.put(mi.internalPointer()).put(",").put(mi.model());
......@@ -1442,8 +1442,8 @@ static void qDumpQHash(QDumper &d)
} else {
d.putItem("addr", node);
d.beginItem("type");
d.put("'"NS"QHashNode<").put(keyType).put(",")
.put(valueType).put(MAP_NODE_TYPE_END"'");
d.put(NS"QHashNode<").put(keyType).put(",")
.put(valueType).put(MAP_NODE_TYPE_END);
d.endItem();
}
d.endHash();
......@@ -2272,7 +2272,7 @@ static void qDumpQObjectMethodList(QDumper &d)
static const char *qConnectionType(uint type)
{
Qt::ConnectionType connType = static_cast<Qt::ConnectionType>(type);
const char *output;
const char *output = "unknown";
switch (connType) {
case Qt::AutoConnection: output = "auto"; break;
case Qt::DirectConnection: output = "direct"; break;
......@@ -2315,8 +2315,7 @@ static inline void qDumpQObjectConnectionPart(QDumper &d,
d.put(number).put(namePostfix);
d.endItem();
if (partner == owner) {
d.putItem("value", QLatin1String("<this>"));
d.putItem("valueencoded", "2");
d.putItem("value", "<this>");
d.putItem("type", owner->metaObject()->className());
d.putItem("numchild", 0);
d.putItem("addr", owner);
......@@ -2613,6 +2612,14 @@ static void qDumpQSharedPointer(QDumper &d)
const QSharedPointer<int> &ptr =
*reinterpret_cast<const QSharedPointer<int> *>(d.data);
if (ptr.isNull()) {
d.putItem("value", "<null>");
d.putItem("valuedisabled", "true");
d.putItem("numchild", 0);
d.disarm();
return;
}
if (isSimpleType(d.innertype))
qDumpInnerValueHelper(d, d.innertype, ptr.data());
else
......@@ -2769,6 +2776,15 @@ static void qDumpQWeakPointer(QDumper &d)
{
const int v = sizeof(void *);
const void *value = deref(addOffset(d.data, v));
const void *data = deref(d.data);
if (value == 0 || data == 0) {
d.putItem("value", "<null>");
d.putItem("valuedisabled", "true");
d.putItem("numchild", 0);
d.disarm();
return;
}
if (isSimpleType(d.innertype))
qDumpInnerValueHelper(d, d.innertype, value);
......@@ -3429,8 +3445,8 @@ void *qDumpObjectData440(
"\""NS"QFileInfo\","
"\""NS"QHash\","
"\""NS"QHashNode\","
"\""NS"QImage\","
"\""NS"QImageData\","
//"\""NS"QImage\","
//"\""NS"QImageData\","
"\""NS"QLinkedList\","
"\""NS"QList\","
"\""NS"QLocale\","
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -184,8 +184,8 @@
<key>CFBundleIdentifier</key>
<string>com.nokia.qtcreator</string>
<key>CFBundleVersion</key>
<string>1.2.80</string>
<string>1.2.90</string>
<key>CFBundleShortVersionString</key>
<string>1.2.80</string>
<string>1.2.90</string>
</dict>
</plist>
<plugin name="BinEditor" version="1.2.80" compatVersion="1.2.80">
<plugin name="BinEditor" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,7 +19,7 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Binary editor component.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="Core" version="1.2.90"/>
<dependency name="TextEditor" version="1.2.90"/>
</dependencyList>
</plugin>
......@@ -439,13 +439,13 @@ bool BinEditor::inTextArea(const QPoint &pos) const
return (x > 16 * m_columnWidth + m_charWidth/2);
}
void BinEditor::updateLines()
{
updateLines(m_cursorPosition, m_cursorPosition);
}
void BinEditor::updateLines(int fromPosition, int toPosition)
{
if (fromPosition < 0)
fromPosition = m_cursorPosition;
if (toPosition < 0)
toPosition = fromPosition;
int topLine = verticalScrollBar()->value();
int firstLine = qMin(fromPosition, toPosition) / 16;
int lastLine = qMax(fromPosition, toPosition) / 16;
......@@ -650,6 +650,7 @@ void BinEditor::paintEvent(QPaintEvent *e)
const char *hex = "0123456789abcdef";
painter.setPen(palette().text().color());
const QFontMetrics &fm = painter.fontMetrics();
for (int i = 0; i <= m_numVisibleLines; ++i) {
int line = topLine + i;
if (line >= m_numLines)
......@@ -715,18 +716,18 @@ void BinEditor::paintEvent(QPaintEvent *e)
if (foundPatternAt >= 0 && pos >= foundPatternAt && pos < foundPatternAt + matchLength) {
painter.fillRect(item_x, y-m_ascent, m_columnWidth, m_lineHeight, QColor(0xffef0b));
int printable_item_x = -xoffset + m_margin + m_labelWidth + 16 * m_columnWidth + m_charWidth
+ painter.fontMetrics().width( printable.left(c));
+ fm.width(printable.left(c));
painter.fillRect(printable_item_x, y-m_ascent,
painter.fontMetrics().width(printable.at(c)),
fm.width(printable.at(c)),
m_lineHeight, QColor(0xffef0b));
}
if (selStart < selEnd && !isFullySelected && pos >= selStart && pos < selEnd) {
selectionRect |= QRect(item_x, y-m_ascent, m_columnWidth, m_lineHeight);
int printable_item_x = -xoffset + m_margin + m_labelWidth + 16 * m_columnWidth + m_charWidth
+ painter.fontMetrics().width( printable.left(c));
+ fm.width(printable.left(c));
printableSelectionRect |= QRect(printable_item_x, y-m_ascent,
painter.fontMetrics().width(printable.at(c)),
fm.width(printable.at(c)),
m_lineHeight);
}
}
......@@ -754,7 +755,7 @@ void BinEditor::paintEvent(QPaintEvent *e)
if (cursor >= 0) {
int w = painter.fontMetrics().boundingRect(itemString.mid(cursor*3, 2)).width();
int w = fm.boundingRect(itemString.mid(cursor*3, 2)).width();
QRect cursorRect(x + cursor * m_columnWidth, y - m_ascent, w + 1, m_lineHeight);
painter.save();
painter.setPen(Qt::red);
......@@ -762,7 +763,7 @@ void BinEditor::paintEvent(QPaintEvent *e)
painter.restore();
if (m_hexCursor && m_cursorVisible) {
if (m_lowNibble)
cursorRect.adjust(painter.fontMetrics().width(itemString.left(1)), 0, 0, 0);
cursorRect.adjust(fm.width(itemString.left(1)), 0, 0, 0);
painter.fillRect(cursorRect, Qt::red);
painter.save();
painter.setClipRect(cursorRect);
......@@ -776,7 +777,7 @@ void BinEditor::paintEvent(QPaintEvent *e)
if (isFullySelected) {
painter.save();
painter.fillRect(text_x, y-m_ascent, painter.fontMetrics().width(printable), m_lineHeight,
painter.fillRect(text_x, y-m_ascent, fm.width(printable), m_lineHeight,
palette().highlight());
painter.setPen(palette().highlightedText().color());
painter.drawText(text_x, y, printable);
......@@ -794,9 +795,9 @@ void BinEditor::paintEvent(QPaintEvent *e)
}
if (cursor >= 0 && !printable.isEmpty()) {
QRect cursorRect(text_x + painter.fontMetrics().width(printable.left(cursor)),
QRect cursorRect(text_x + fm.width(printable.left(cursor)),
y-m_ascent,
painter.fontMetrics().width(printable.at(cursor)),
fm.width(printable.at(cursor)),
m_lineHeight);
painter.save();
if (m_hexCursor || !m_cursorVisible) {
......
......@@ -187,7 +187,8 @@ private:
int posAt(const QPoint &pos) const;
bool inTextArea(const QPoint &pos) const;
QRect cursorRect() const;
void updateLines(int fromPosition = -1, int toPosition = -1);
void updateLines();
void updateLines(int fromPosition, int toPosition);
void ensureCursorVisible();
void setBlinkingCursorEnabled(bool enable);
......
<plugin name="Bookmarks" version="1.2.80" compatVersion="1.2.80">
<plugin name="Bookmarks" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Bookmarks in text editors.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="ProjectExplorer" version="1.2.80"/>
<dependency name="Core" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.90"/>
<dependency name="ProjectExplorer" version="1.2.90"/>
<dependency name="Core" version="1.2.90"/>
</dependencyList>
</plugin>
<plugin name="CMakeProjectManager" version="1.2.80" compatVersion="1.2.80">
<plugin name="CMakeProjectManager" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>CMake support</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="ProjectExplorer" version="1.2.80"/>
<dependency name="CppTools" version="1.2.80"/>
<dependency name="CppEditor" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.90"/>
<dependency name="ProjectExplorer" version="1.2.90"/>
<dependency name="CppTools" version="1.2.90"/>
<dependency name="CppEditor" version="1.2.90"/>
</dependencyList>
</plugin>
......@@ -26,7 +26,6 @@
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include "makestep.h"
#include "cmakeprojectconstants.h"
#include "cmakeproject.h"
......
<plugin name="Core" version="1.2.80" compatVersion="1.2.80">
<plugin name="Core" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......
......@@ -35,7 +35,7 @@ namespace Constants {
#define IDE_VERSION_MAJOR 1
#define IDE_VERSION_MINOR 2
#define IDE_VERSION_RELEASE 80
#define IDE_VERSION_RELEASE 90
#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
......
......@@ -554,13 +554,11 @@ IEditor *EditorManager::currentEditor() const
return m_d->m_currentEditor;
}
void EditorManager::emptyView(Core::Internal::EditorView *view)
{
if (!view)
return;
QList<IEditor *> editors = view->editors();
foreach (IEditor *editor, editors) {
if (!m_d->m_editorModel->isDuplicate(editor)) {
......@@ -1484,8 +1482,8 @@ void EditorManager::updateActions()
m_d->m_gotoNextDocHistoryAction->setEnabled(m_d->m_editorModel->rowCount() != 0);
m_d->m_gotoPreviousDocHistoryAction->setEnabled(m_d->m_editorModel->rowCount() != 0);
EditorView *view = currentEditorView();
m_d->m_goBackAction->setEnabled(view->canGoBack());
m_d->m_goForwardAction->setEnabled(view->canGoForward());
m_d->m_goBackAction->setEnabled(view ? view->canGoBack() : false);
m_d->m_goForwardAction->setEnabled(view ? view->canGoForward() : false);
bool hasSplitter = m_d->m_splitter->isSplitter();
m_d->m_removeCurrentSplitAction->setEnabled(hasSplitter);
......
......@@ -617,7 +617,6 @@ SplitterOrView::SplitterOrView(OpenEditorsModel *model)
m_view = new EditorView(model);
m_splitter = 0;
m_layout->addWidget(m_view);
setFocusPolicy(Qt::ClickFocus);
}
SplitterOrView::SplitterOrView(Core::IEditor *editor)
......@@ -629,7 +628,6 @@ SplitterOrView::SplitterOrView(Core::IEditor *editor)
m_view->addEditor(editor);
m_splitter = 0;
m_layout->addWidget(m_view);
setFocusPolicy(Qt::ClickFocus);
}
SplitterOrView::~SplitterOrView()
......@@ -642,20 +640,24 @@ SplitterOrView::~SplitterOrView()
m_splitter = 0;
}
void SplitterOrView::focusInEvent(QFocusEvent *)
void SplitterOrView::mousePressEvent(QMouseEvent *e)
{
if (e->button() != Qt::LeftButton)
return;
setFocus(Qt::MouseFocusReason);
CoreImpl::instance()->editorManager()->setCurrentView(this);
}
void SplitterOrView::paintEvent(QPaintEvent *)
{
if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this)
if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this)
return;
QPainter painter(this);
// Discreet indication where an editor would be
if (!m_view || hasEditors())
return;
// Discreet indication where an editor would be if there is none
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true);
painter.setPen(Qt::NoPen);
QColor shadeBrush(Qt::black);
......@@ -664,6 +666,7 @@ void SplitterOrView::paintEvent(QPaintEvent *)
const int r = 3;
painter.drawRoundedRect(rect().adjusted(r, r, -r, -r), r * 2, r * 2);
#if 0
if (hasFocus()) {
#ifdef Q_WS_MAC
// With QMacStyle, we have to draw our own focus rect, since I didn't find
......@@ -687,6 +690,7 @@ void SplitterOrView::paintEvent(QPaintEvent *)
}
#endif
}
#endif
}
SplitterOrView *SplitterOrView::findFirstView()
......
......@@ -199,8 +199,8 @@ public:
void unsplitAll();
protected:
void focusInEvent(QFocusEvent *);
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *e);
private:
......
src/plugins/coreplugin/images/inputfield.png

422 Bytes | W: | H:

src/plugins/coreplugin/images/inputfield.png

379 Bytes | W: | H:

src/plugins/coreplugin/images/inputfield.png
src/plugins/coreplugin/images/inputfield.png
src/plugins/coreplugin/images/inputfield.png
src/plugins/coreplugin/images/inputfield.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -474,6 +474,12 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
case PE_PanelLineEdit:
{
painter->save();
// Fill the line edit background
QRect filledRect = option->rect.adjusted(1, 1, -1, -1);
painter->setBrushOrigin(filledRect.topLeft());
painter->fillRect(filledRect, option->palette.base());
if (option->state & State_Enabled)
drawCornerImage(d->lineeditImage, painter, option->rect, 2, 2, 2, 2);
else
......
......@@ -176,8 +176,8 @@ void NavigationWidget::resizeEvent(QResizeEvent *re)
NavigationSubWidget *NavigationWidget::insertSubItem(int position)
{
NavigationSubWidget *nsw = new NavigationSubWidget(this);
connect(nsw, SIGNAL(split()), this, SLOT(split()));
connect(nsw, SIGNAL(close()), this, SLOT(close()));
connect(nsw, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
connect(nsw, SIGNAL(closeMe()), this, SLOT(closeSubWidget()));
insertWidget(position, nsw);
m_subWidgets.insert(position, nsw);
return nsw;
......@@ -199,7 +199,7 @@ void NavigationWidget::activateSubWidget()
m_subWidgets.first()->setFocusWidget();
}
void NavigationWidget::split()
void NavigationWidget::splitSubWidget()
{
NavigationSubWidget *original = qobject_cast<NavigationSubWidget *>(sender());
int pos = indexOf(original) + 1;
......@@ -207,7 +207,7 @@ void NavigationWidget::split()
newnsw->setFactory(original->factory());
}
void NavigationWidget::close()
void NavigationWidget::closeSubWidget()
{
if (m_subWidgets.count() != 1) {
NavigationSubWidget *subWidget = qobject_cast<NavigationSubWidget *>(sender());
......@@ -389,8 +389,8 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget)
setLayout(lay);
lay->addWidget(m_toolBar);
connect(splitAction, SIGNAL(clicked()), this, SIGNAL(split()));
connect(close, SIGNAL(clicked()), this, SIGNAL(close()));
connect(splitAction, SIGNAL(clicked()), this, SIGNAL(splitMe()));
connect(close, SIGNAL(clicked()), this, SIGNAL(closeMe()));
connect(m_navigationComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(setCurrentIndex(int)));
......
......@@ -103,8 +103,8 @@ protected:
private slots:
void objectAdded(QObject*);
void activateSubWidget();
void split();
void close();
void splitSubWidget();
void closeSubWidget();
private:
NavigationSubWidget *insertSubItem(int position);
......@@ -136,8 +136,8 @@ public:
Core::Command *command(const QString &title) const;
signals:
void split();
void close();
void splitMe();
void closeMe();
private slots:
void objectAdded(QObject*);
......
......@@ -46,10 +46,6 @@
#include <QtGui/QToolBar>
#include <QtGui/QStatusBar>
namespace {
enum { debugQWorkbenchWrappers = 0 };
}
// Script function template to pop up a message box
// with a certain icon and buttons.
template <int MsgBoxIcon, int MsgBoxButtons>
......@@ -178,14 +174,9 @@ namespace Core {
namespace Internal {
ScriptManagerPrivate::ScriptManagerPrivate(QObject *parent)
: ScriptManager(parent), m_initialized(false)
{
}
QScriptEngine &ScriptManagerPrivate::scriptEngine()
: ScriptManager(parent),
m_engine(0)
{
ensureEngineInitialized();
return m_engine;
}
// Split a backtrace of the form:
......@@ -225,25 +216,26 @@ bool ScriptManagerPrivate::runScript(const QString &script, QString *errorMessag
ensureEngineInitialized();
stack->clear();
m_engine.pushContext();
m_engine.evaluate(script);
m_engine->pushContext();
m_engine->evaluate(script);
const bool failed = m_engine.hasUncaughtException ();
const bool failed = m_engine->hasUncaughtException ();
if (failed) {
const int errorLineNumber = m_engine.uncaughtExceptionLineNumber();
const QStringList backTrace = m_engine.uncaughtExceptionBacktrace();
const int errorLineNumber = m_engine->uncaughtExceptionLineNumber();
const QStringList backTrace = m_engine->uncaughtExceptionBacktrace();
parseBackTrace(backTrace, *stack);
const QString backtrace = backTrace.join(QString(QLatin1Char('\n')));
*errorMessage = ScriptManager::tr("Exception at line %1: %2\n%3").arg(errorLineNumber).arg(engineError(m_engine)).arg(backtrace);
}
m_engine.popContext();
m_engine->popContext();
return !failed;
}
void ScriptManagerPrivate::ensureEngineInitialized()
{
if (m_initialized)
if (m_engine)
return;
m_engine = new QScriptEngine(this);
// register QObjects that occur as properties
SharedTools::registerQObject<QMainWindow>(m_engine);
SharedTools::registerQObject<QStatusBar>(m_engine);
......@@ -252,52 +244,51 @@ void ScriptManagerPrivate::ensureEngineInitialized()
// SharedTools::registerQObjectInterface<Core::MessageManager, MessageManagerPrototype>(m_engine);
// SharedTools::registerQObjectInterface<Core::IFile, FilePrototype>(m_engine);
// qScriptRegisterSequenceMetaType<QList<Core::IFile *> >(&m_engine);
// qScriptRegisterSequenceMetaType<QList<Core::IFile *> >(m_engine);
// SharedTools::registerQObjectInterface<Core::FileManager, FileManagerPrototype>(m_engine);
// SharedTools::registerQObjectInterface<Core::IEditor, EditorPrototype>(m_engine);
qScriptRegisterSequenceMetaType<QList<Core::IEditor *> >(&m_engine);
qScriptRegisterSequenceMetaType<QList<Core::IEditor *> >(m_engine);
// SharedTools::registerQObjectInterface<Core::EditorGroup, EditorGroupPrototype>(m_engine);
qScriptRegisterSequenceMetaType<QList<Core::EditorGroup *> >(&m_engine);
qScriptRegisterSequenceMetaType<QList<Core::EditorGroup *> >(m_engine);
SharedTools::registerQObjectInterface<Core::EditorManager, EditorManagerPrototype>(m_engine);
// SharedTools::registerQObjectInterface<Core::ICore, CorePrototype>(m_engine);
// Make "core" available
m_engine.globalObject().setProperty(QLatin1String("core"), qScriptValueFromValue(&m_engine, Core::ICore::instance()));
m_engine->globalObject().setProperty(QLatin1String("core"), qScriptValueFromValue(m_engine, Core::ICore::instance()));
// CLASSIC: registerInterfaceWithDefaultPrototype<Core::MessageManager, MessageManagerPrototype>(m_engine);
// Message box conveniences
m_engine.globalObject().setProperty(QLatin1String("critical"),
m_engine.newFunction(messageBox<QMessageBox::Critical, QMessageBox::Ok>, 3));
m_engine.globalObject().setProperty(QLatin1String("warning"),
m_engine.newFunction(messageBox<QMessageBox::Warning, QMessageBox::Ok>, 3));
m_engine.globalObject().setProperty(QLatin1String("information"),
m_engine.newFunction(messageBox<QMessageBox::Information, QMessageBox::Ok>, 3));
m_engine->globalObject().setProperty(QLatin1String("critical"),
m_engine->newFunction(messageBox<QMessageBox::Critical, QMessageBox::Ok>, 3));
m_engine->globalObject().setProperty(QLatin1String("warning"),
m_engine->newFunction(messageBox<QMessageBox::Warning, QMessageBox::Ok>, 3));
m_engine->globalObject().setProperty(QLatin1String("information"),
m_engine->newFunction(messageBox<QMessageBox::Information, QMessageBox::Ok>, 3));
// StandardButtons has overloaded operator '|' - grrr.
enum { MsgBoxYesNo = 0x00014000 };
m_engine.globalObject().setProperty(QLatin1String("yesNoQuestion"),
m_engine.newFunction(messageBox<QMessageBox::Question, MsgBoxYesNo>, 3));
m_engine->globalObject().setProperty(QLatin1String("yesNoQuestion"),
m_engine->newFunction(messageBox<QMessageBox::Question, MsgBoxYesNo>, 3));
m_engine.globalObject().setProperty(QLatin1String("getText"), m_engine.newFunction(inputDialogGetText, 3));
m_engine.globalObject().setProperty(QLatin1String("getInteger"), m_engine.newFunction(inputDialogGetInteger, 3));
m_engine.globalObject().setProperty(QLatin1String("getDouble"), m_engine.newFunction(inputDialogGetDouble, 3));
m_engine.globalObject().setProperty(QLatin1String("getItem"), m_engine.newFunction(inputDialogGetItem, 3));
m_engine->globalObject().setProperty(QLatin1String("getText"), m_engine->newFunction(inputDialogGetText, 3));
m_engine->globalObject().setProperty(QLatin1String("getInteger"), m_engine->newFunction(inputDialogGetInteger, 3));
m_engine->globalObject().setProperty(QLatin1String("getDouble"), m_engine->newFunction(inputDialogGetDouble, 3));
m_engine->globalObject().setProperty(QLatin1String("getItem"), m_engine->newFunction(inputDialogGetItem, 3));
// file box
m_engine.globalObject().setProperty(QLatin1String("getOpenFileNames"), m_engine.newFunction(fileBox<QFileDialog::AcceptOpen, QFileDialog::ExistingFiles> , 2));
m_engine.globalObject().setProperty(QLatin1String("getOpenFileName"), m_engine.newFunction(fileBox<QFileDialog::AcceptOpen, QFileDialog::ExistingFile> , 2));
m_engine.globalObject().setProperty(QLatin1String("getSaveFileName"), m_engine.newFunction(fileBox<QFileDialog::AcceptSave, QFileDialog::AnyFile> , 2));
m_engine.globalObject().setProperty(QLatin1String("getExistingDirectory"), m_engine.newFunction(fileBox<QFileDialog::AcceptSave, QFileDialog::DirectoryOnly> , 2));
m_initialized = true;
m_engine->globalObject().setProperty(QLatin1String("getOpenFileNames"), m_engine->newFunction(fileBox<QFileDialog::AcceptOpen, QFileDialog::ExistingFiles> , 2));
m_engine->globalObject().setProperty(QLatin1String("getOpenFileName"), m_engine->newFunction(fileBox<QFileDialog::AcceptOpen, QFileDialog::ExistingFile> , 2));
m_engine->globalObject().setProperty(QLatin1String("getSaveFileName"), m_engine->newFunction(fileBox<QFileDialog::AcceptSave, QFileDialog::AnyFile> , 2));
m_engine->globalObject().setProperty(QLatin1String("getExistingDirectory"), m_engine->newFunction(fileBox<QFileDialog::AcceptSave, QFileDialog::DirectoryOnly> , 2));
}
QString ScriptManagerPrivate::engineError(QScriptEngine &scriptEngine)
QString ScriptManagerPrivate::engineError(QScriptEngine *scriptEngine)
{
QScriptValue error = scriptEngine.evaluate(QLatin1String("Error"));
QScriptValue error = scriptEngine->evaluate(QLatin1String("Error"));
if (error.isValid())
return error.toString();
return ScriptManager::tr("Unknown error");
......
......@@ -59,9 +59,6 @@ public:
ScriptManager(QObject *parent = 0) : QObject(parent) {}
virtual ~ScriptManager() { }
// Access the engine (for plugins to wrap additional interfaces).
virtual QScriptEngine &scriptEngine() = 0;
// Run a script
virtual bool runScript(const QString &script, QString *errorMessage, Stack *errorStack) = 0;
virtual bool runScript(const QString &script, QString *errorMessage) = 0;
......
......@@ -45,17 +45,15 @@ class ScriptManagerPrivate : public Core::ScriptManager
public:
explicit ScriptManagerPrivate(QObject *parent);
QScriptEngine &scriptEngine();
bool runScript(const QString &script, QString *errorMessage, Stack *stack);
bool runScript(const QString &script, QString *errorMessage);
static QString engineError(QScriptEngine &scriptEngine);
static QString engineError(QScriptEngine *scriptEngine);
private:
void ensureEngineInitialized();
QScriptEngine m_engine;
bool m_initialized;
QScriptEngine *m_engine;
};
} // namespace Internal
......
......@@ -101,8 +101,8 @@ SideBarItem *SideBar::item(const QString &title)
SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &title)
{
SideBarWidget *item = new SideBarWidget(this, title);
connect(item, SIGNAL(split()), this, SLOT(split()));
connect(item, SIGNAL(close()), this, SLOT(close()));
connect(item, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
connect(item, SIGNAL(closeMe()), this, SLOT(closeSubWidget()));
connect(item, SIGNAL(currentWidgetChanged()), this, SLOT(updateWidgets()));
insertWidget(position, item);
m_widgets.insert(position, item);
......@@ -118,7 +118,7 @@ void SideBar::removeSideBarWidget(SideBarWidget *widget)
widget->deleteLater();
}
void SideBar::split()
void SideBar::splitSubWidget()
{
SideBarWidget *original = qobject_cast<SideBarWidget*>(sender());
int pos = indexOf(original) + 1;
......@@ -126,7 +126,7 @@ void SideBar::split()
updateWidgets();
}
void SideBar::close()
void SideBar::closeSubWidget()
{
if (m_widgets.count() != 1) {
SideBarWidget *widget = qobject_cast<SideBarWidget*>(sender());
......@@ -239,13 +239,13 @@ SideBarWidget::SideBarWidget(SideBar *sideBar, const QString &title)
m_splitButton = new QToolButton;
m_splitButton->setIcon(QIcon(":/core/images/splitbutton_horizontal.png"));
m_splitButton->setToolTip(tr("Split"));
connect(m_splitButton, SIGNAL(clicked(bool)), this, SIGNAL(split()));
connect(m_splitButton, SIGNAL(clicked(bool)), this, SIGNAL(splitMe()));
m_closeButton = new QToolButton;
m_closeButton->setIcon(QIcon(":/core/images/closebutton.png"));
m_closeButton->setToolTip(tr("Close"));
connect(m_closeButton, SIGNAL(clicked(bool)), this, SIGNAL(close()));
connect(m_closeButton, SIGNAL(clicked(bool)), this, SIGNAL(closeMe()));
QWidget *spacerItem = new QWidget(this);
spacerItem->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
......
......@@ -111,8 +111,8 @@ public:
QMap<QString, Core::Command*> shortcutMap() const;
private slots:
void split();
void close();
void splitSubWidget();
void closeSubWidget();
void updateWidgets();
private:
......@@ -146,8 +146,8 @@ public:
Core::Command *command(const QString &title) const;
signals:
void split();
void close();
void splitMe();
void closeMe();
void currentWidgetChanged();
private slots:
......
<plugin name="CodePaster" version="1.2.80" compatVersion="1.2.80">
<plugin name="CodePaster" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Codepaster plugin for pushing/fetching diff from server</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="ProjectExplorer" version="1.2.80"/>
<dependency name="Core" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.90"/>
<dependency name="ProjectExplorer" version="1.2.90"/>
<dependency name="Core" version="1.2.90"/>
</dependencyList>
</plugin>
<plugin name="CppEditor" version="1.2.80" compatVersion="1.2.80">
<plugin name="CppEditor" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>C/C++ editor component.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="Core" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="CppTools" version="1.2.80"/>
<dependency name="Core" version="1.2.90"/>
<dependency name="TextEditor" version="1.2.90"/>
<dependency name="CppTools" version="1.2.90"/>
</dependencyList>
</plugin>
<plugin name="CppTools" version="1.2.80" compatVersion="1.2.80">
<plugin name="CppTools" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,8 +19,8 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Tools for analyzing C/C++ code.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="ProjectExplorer" version="1.2.80"/>
<dependency name="QuickOpen" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.90"/>
<dependency name="ProjectExplorer" version="1.2.90"/>
<dependency name="QuickOpen" version="1.2.90"/>
</dependencyList>
</plugin>
......@@ -1099,6 +1099,9 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
QStringList suffixes)
{
QMap<QString, QStringList> entriesInPaths;
typedef QPair<QString, QString> SymLink;
typedef QList<SymLink> SymLinks;
SymLinks symlinks;
int processed = 0;
future.setProgressRange(0, paths.size());
......@@ -1111,6 +1114,11 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
break;
const QString path = paths.takeFirst();
// Skip already scanned paths
if (entriesInPaths.contains(path))
continue;
QStringList entries;
QDirIterator i(path, QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
......@@ -1119,17 +1127,24 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
const QFileInfo fileInfo = i.fileInfo();
const QString suffix = fileInfo.suffix();
if (suffix.isEmpty() || suffixes.contains(suffix)) {
QString text = fileName.mid(path.length() + 1);
QString text = fileInfo.fileName();
if (fileInfo.isDir()) {
text += QLatin1Char('/');
// Also scan subdirectory, but avoid endless recursion with symbolic links
if (fileInfo.isSymLink()) {
QMap<QString, QStringList>::const_iterator result = entriesInPaths.find(fileInfo.canonicalFilePath());
QString target = fileInfo.symLinkTarget();
// Don't add broken symlinks
if (!QFileInfo(target).exists())
continue;
QMap<QString, QStringList>::const_iterator result = entriesInPaths.find(target);
if (result != entriesInPaths.constEnd()) {
entriesInPaths.insert(fileName, result.value());
} else {
paths.append(fileName);
paths.append(target);
symlinks.append(SymLink(fileName, target));
}
} else {
paths.append(fileName);
......@@ -1145,6 +1160,14 @@ void CppModelManager::updateIncludesInPaths(QFutureInterface<void> &future,
future.setProgressRange(0, processed + paths.size());
future.setProgressValue(processed);
}
// link symlinks
QListIterator<SymLink> it(symlinks);
it.toBack();
while (it.hasPrevious()) {
SymLink v = it.previous();
QMap<QString, QStringList>::const_iterator result = entriesInPaths.find(v.second);
entriesInPaths.insert(v.first, result.value());
}
manager->setIncludesInPaths(entriesInPaths);
......
......@@ -41,7 +41,7 @@ namespace ProjectExplorer {
}
namespace CppTools {
class AbstractEditorSupport;
class CPPTOOLS_EXPORT CppModelManagerInterface : public QObject
......
<plugin name="CVS" version="1.2.80" compatVersion="1.2.80">
<plugin name="CVS" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,9 +19,9 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>CVS integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="TextEditor" version="1.2.80"/>
<dependency name="ProjectExplorer" version="1.2.80"/>
<dependency name="Core" version="1.2.80"/>
<dependency name="VCSBase" version="1.2.80"/>
<dependency name="TextEditor" version="1.2.90"/>
<dependency name="ProjectExplorer" version="1.2.90"/>
<dependency name="Core" version="1.2.90"/>
<dependency name="VCSBase" version="1.2.90"/>
</dependencyList>
</plugin>
......@@ -1034,7 +1034,7 @@ static inline QString msgExecutionLogEntry(const QString &workingDir, const QStr
const QString args = arguments.join(QString(QLatin1Char(' ')));
if (workingDir.isEmpty())
return CVSPlugin::tr("Executing: %1 %2\n").arg(executable, args);
return CVSPlugin::tr("Executing in %1: %2 %2\n").arg(workingDir, executable, args);
return CVSPlugin::tr("Executing in %1: %2 %3\n").arg(workingDir, executable, args);
}
// Figure out a working directory for the process,
......
<plugin name="Debugger" version="1.2.80" compatVersion="1.2.80">
<plugin name="Debugger" version="1.2.90" compatVersion="1.2.90">
<vendor>Nokia Corporation</vendor>
<copyright>(C) 2008-2009 Nokia Corporation</copyright>
<license>
......@@ -19,10 +19,10 @@ will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.</license>
<description>Debugger integration.</description>
<url>http://qt.nokia.com</url>
<dependencyList>
<dependency name="CppEditor" version="1.2.80"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="1.2.80"/>
<dependency name="Core" version="1.2.80"/>
<dependency name="Find" version="1.2.80"/>
<dependency name="CppEditor" version="1.2.90"/><!-- Debugger plugin adds items to the editor's context menu -->
<dependency name="ProjectExplorer" version="1.2.90"/>
<dependency name="Core" version="1.2.90"/>
<dependency name="Find" version="1.2.90"/>
</dependencyList>
<argumentList>
<argument name="-disable-cdb">Disable Cdb debugger engine</argument>
......
......@@ -196,13 +196,14 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
menu.addAction(deleteAllAction);
menu.addAction(deleteByFileAction);
menu.addSeparator();
menu.addAction(adjustColumnAction);
menu.addAction(alwaysAdjustAction);
menu.addAction(synchronizeAction);
menu.addSeparator();
menu.addAction(breakAtFunctionAction);
menu.addAction(breakAtMainAction);
menu.addSeparator();
menu.addAction(adjustColumnAction);
menu.addAction(alwaysAdjustAction);
menu.addSeparator();
menu.addAction(theDebuggerAction(SettingsDialog));
QAction *act = menu.exec(ev->globalPos());
......
......@@ -400,7 +400,7 @@ bool CdbDebugEnginePrivate::setCodeLevel()
}
if (debugCDB)
qDebug() << Q_FUNC_INFO << "\nSetting code level to " << codeLevelName(codeLevel) << " (was" << codeLevelName(currentCodeLevel) << ')';
if (currentCodeLevel == currentCodeLevel)
if (currentCodeLevel == codeLevel)
return false;