Commit 7081a3d4 authored by con's avatar con
Browse files

Merge remote branch 'origin/1.3'

Conflicts:
	src/plugins/projectexplorer/outputwindow.cpp
parents bad8a15f 8f586ced
......@@ -1103,7 +1103,8 @@
\o Notes
\row
\o Gdb
\o Requires gdb version 6.8.
\o Requires gdb version 6.8 on Linux. On Mac OS X, please install the latest available Xcode
available for your OS version.
\row
\o Debugging tools for Windows
\o Using this engine requires you to install the
......
......@@ -79,6 +79,12 @@ QByteArray CheckUndefinedSymbols::templateParameterName(DeclarationAST *ast) con
return templateParameterName(d->name);
else if (TemplateTypeParameterAST *d = ast->asTemplateTypeParameter())
return templateParameterName(d->name);
else if (ParameterDeclarationAST *d = ast->asParameterDeclaration()) {
if (d->symbol) {
if (const Identifier *id = d->symbol->identifier())
return QByteArray::fromRawData(id->chars(), id->size());
}
}
}
return QByteArray();
}
......
......@@ -128,6 +128,8 @@ ProjectExplorer::FolderNode *GenericProjectNode::findOrCreateFolderByName(const
if (! end)
return 0;
QString baseDir = QFileInfo(path()).path();
QString folderName;
for (int i = 0; i < end; ++i) {
folderName.append(components.at(i));
......@@ -142,7 +144,8 @@ ProjectExplorer::FolderNode *GenericProjectNode::findOrCreateFolderByName(const
else if (FolderNode *folder = m_folderByName.value(folderName))
return folder;
FolderNode *folder = new FolderNode(component);
FolderNode *folder = new FolderNode(baseDir + "/" + folderName);
folder->setFolderName(component);
m_folderByName.insert(folderName, folder);
FolderNode *parent = findOrCreateFolderByName(components, end - 1);
......
......@@ -242,10 +242,6 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc
QString DebuggingHelperLibrary::qtVersionForQMake(const QString &qmakePath)
{
QString binary = qmakePath.mid(qmakePath.lastIndexOf('/')+1);
if (!possibleQMakeCommands().contains(binary))
return QString();
QProcess qmake;
qmake.start(qmakePath, QStringList(QLatin1String("--version")));
if (!qmake.waitForFinished())
......
......@@ -200,7 +200,8 @@ void OutputPane::createNewOutputWindow(RunControl *rc)
delete old;
m_outputWindows.remove(old);
OutputWindow *ow = static_cast<OutputWindow *>(m_tabWidget->widget(i));
ow->appendOutput("");//New line
ow->grayOutOldContent();
ow->verticalScrollBar()->setValue(ow->verticalScrollBar()->maximum());
m_outputWindows.insert(rc, ow);
found = true;
break;
......@@ -243,7 +244,11 @@ void OutputPane::insertLine()
void OutputPane::reRunRunControl()
{
RunControl *rc = runControlForTab(m_tabWidget->currentIndex());
int index = m_tabWidget->currentIndex();
RunControl *rc = runControlForTab(index);
OutputWindow *ow = static_cast<OutputWindow *>(m_tabWidget->widget(index));
ow->grayOutOldContent();
ow->verticalScrollBar()->setValue(ow->verticalScrollBar()->maximum());
rc->start();
}
......@@ -457,6 +462,22 @@ void OutputWindow::insertLine()
enableUndoRedo();
}
void OutputWindow::grayOutOldContent()
{
QTextCursor cursor = textCursor();
cursor.select(QTextCursor::Document);
QTextBlockFormat tbf;
const QColor bkgColor = palette().window().color();
const QColor fgdColor = palette().windowText().color();
tbf.setBackground(QColor((0.5 * bkgColor.red() + 0.5* fgdColor.red()),\
(0.5 * bkgColor.green() + 0.5* fgdColor.green()),\
(0.5 * bkgColor.blue() + 0.5* fgdColor.blue()) ));
cursor.mergeBlockFormat(tbf);
cursor.movePosition(QTextCursor::End);
cursor.insertBlock(QTextBlockFormat());
}
void OutputWindow::enableUndoRedo()
{
setMaximumBlockCount(0);
......
......@@ -125,6 +125,7 @@ public:
void appendOutput(const QString &out);
void appendOutputInline(const QString &out);
void insertLine();
void grayOutOldContent();
void showEvent(QShowEvent *);
......
......@@ -117,6 +117,8 @@ ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QStr
if (! end)
return 0;
QString baseDir = QFileInfo(path()).path();
QString folderName;
for (int i = 0; i < end; ++i) {
folderName.append(components.at(i));
......@@ -131,7 +133,9 @@ ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QStr
else if (FolderNode *folder = m_folderByName.value(folderName))
return folder;
FolderNode *folder = new FolderNode(component);
FolderNode *folder = new FolderNode(baseDir + "/" + folderName);
folder->setFolderName(component);
m_folderByName.insert(folderName, folder);
FolderNode *parent = findOrCreateFolderByName(components, end - 1);
......
......@@ -943,8 +943,7 @@ void QtVersion::updateVersionInfo() const
m_hasDocumentation = false;
QFileInfo qmake(qmakeCommand());
if (ProjectExplorer::DebuggingHelperLibrary::possibleQMakeCommands().contains(qmake.fileName())
&& qmake.exists()) {
if (qmake.exists() && qmake.isExecutable()) {
static const char * const variables[] = {
"QT_VERSION",
"QT_INSTALL_DATA",
......
......@@ -3409,11 +3409,10 @@ void BaseTextEditor::indentOrUnindent(bool doIndent)
int pos = cursor.position();
const TextEditor::TabSettings &tabSettings = d->m_document->tabSettings();
QTextDocument *doc = document();
if (!cursor.hasSelection()
|| (doc->findBlock(cursor.selectionStart()) == doc->findBlock(cursor.selectionEnd()) )) {
cursor.removeSelectedText();
if (!cursor.hasSelection() && doIndent) {
// Insert tab if there is no selection and indent is requested
QTextBlock block = cursor.block();
QString text = block.text();
int indentPosition = (cursor.position() - block.position());;
......@@ -3426,6 +3425,7 @@ void BaseTextEditor::indentOrUnindent(bool doIndent)
cursor.removeSelectedText();
cursor.insertText(tabSettings.indentationString(startColumn, targetColumn));
} else {
// Indent or unindent the selected lines
int anchor = cursor.anchor();
int start = qMin(anchor, pos);
int end = qMax(anchor, pos);
......
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