Merge branch '1.0.0'

Conflicts:
	tests/auto/cplusplus/shared/shared.pri
	tests/auto/cplusplus/shared/shared.pro
This commit is contained in:
con
2009-02-09 10:54:36 +01:00
15 changed files with 55 additions and 55 deletions

View File

@@ -92,6 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr
if (ch.isLetterOrNumber() || ch == QLatin1Char('_')) if (ch.isLetterOrNumber() || ch == QLatin1Char('_'))
text += QLatin1Char(' '); text += QLatin1Char(' ');
text += _name; text += _name;
} else if (text.isEmpty()) {
text = name;
} }
(void) switchName(previousName); (void) switchName(previousName);
return text; return text;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -258,6 +258,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
if (!types.isEmpty()) { if (!types.isEmpty()) {
FullySpecifiedType firstType = types.first().first; FullySpecifiedType firstType = types.first().first;
Symbol *symbol = types.first().second;
FullySpecifiedType docType = firstType; FullySpecifiedType docType = firstType;
if (const PointerType *pt = firstType->asPointerType()) { if (const PointerType *pt = firstType->asPointerType()) {
@@ -266,8 +267,8 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
docType = rt->elementType(); docType = rt->elementType();
} }
m_helpId = buildHelpId(docType, types.first().second); m_helpId = buildHelpId(docType, symbol);
QString displayName = buildHelpId(firstType, types.first().second); QString displayName = buildHelpId(firstType, symbol);
if (!firstType->isClass() && !firstType->isNamedType()) { if (!firstType->isClass() && !firstType->isNamedType()) {
Overview overview; Overview overview;
@@ -297,7 +298,7 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
m_helpEngineNeedsSetup = false; m_helpEngineNeedsSetup = false;
} }
if (! m_toolTip.isEmpty()) if (!m_toolTip.isEmpty())
m_toolTip = Qt::escape(m_toolTip); m_toolTip = Qt::escape(m_toolTip);
if (!m_helpId.isEmpty() && !m_helpEngine->linksForIdentifier(m_helpId).isEmpty()) { if (!m_helpId.isEmpty() && !m_helpEngine->linksForIdentifier(m_helpId).isEmpty()) {

View File

@@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Start Debugger</string> <string>Set Breakpoint at Function</string>
</property> </property>
<layout class="QVBoxLayout"> <layout class="QVBoxLayout">
<property name="spacing"> <property name="spacing">

View File

@@ -3337,7 +3337,7 @@ void GdbEngine::handleQueryDataDumper2(const GdbResultRecord &record)
tr("Cannot find special data dumpers"), tr("Cannot find special data dumpers"),
tr("The debugged binary does not contain information needed for " tr("The debugged binary does not contain information needed for "
"nice display of Qt data types.\n\n" "nice display of Qt data types.\n\n"
"Try might want to try include the file\n\n" "You might want to try including the file\n\n"
".../ide/main/bin/gdbmacros/gdbmacros.cpp'\n\n" ".../ide/main/bin/gdbmacros/gdbmacros.cpp'\n\n"
"into your project directly.") "into your project directly.")
); );

View File

@@ -46,14 +46,12 @@ GccParser::GccParser()
m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$"); m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$");
m_regExpIncluded.setMinimal(true); m_regExpIncluded.setMinimal(true);
m_regExpLinker.setPattern("^(\\S+)\\(\\S+\\):\\s(.+)$"); m_regExpLinker.setPattern("^(\\S*)\\(\\S+\\):\\s(.+)$");
m_regExpLinker.setMinimal(true); m_regExpLinker.setMinimal(true);
//make[4]: Entering directory `/home/kkoehne/dev/ide-explorer/src/plugins/qtscripteditor' //make[4]: Entering directory `/home/kkoehne/dev/ide-explorer/src/plugins/qtscripteditor'
m_makeDir.setPattern("^make.*: (\\w+) directory .(.+).$"); m_makeDir.setPattern("^make.*: (\\w+) directory .(.+).$");
m_makeDir.setMinimal(true); m_makeDir.setMinimal(true);
m_linkIndent = false;
} }
QString GccParser::name() const QString GccParser::name() const
@@ -76,7 +74,15 @@ void GccParser::stdOutput(const QString & line)
void GccParser::stdError(const QString & line) void GccParser::stdError(const QString & line)
{ {
QString lne = line.trimmed(); QString lne = line.trimmed();
if (m_regExp.indexIn(lne) > -1) { if (m_regExpLinker.indexIn(lne) > -1) {
QString description = m_regExpLinker.cap(2);
emit addToTaskWindow(
m_regExpLinker.cap(1), //filename
ProjectExplorer::BuildParserInterface::Error,
-1, //linenumber
description);
//qDebug()<<"m_regExpLinker"<<m_regExpLinker.cap(2);
} else if (m_regExp.indexIn(lne) > -1) {
ProjectExplorer::BuildParserInterface::PatternType type; ProjectExplorer::BuildParserInterface::PatternType type;
if (m_regExp.cap(5) == "warning") if (m_regExp.cap(5) == "warning")
type = ProjectExplorer::BuildParserInterface::Warning; type = ProjectExplorer::BuildParserInterface::Warning;
@@ -86,17 +92,14 @@ void GccParser::stdError(const QString & line)
type = ProjectExplorer::BuildParserInterface::Unknown; type = ProjectExplorer::BuildParserInterface::Unknown;
QString description = m_regExp.cap(6); QString description = m_regExp.cap(6);
if (m_linkIndent)
description.prepend(QLatin1String("-> "));
//qDebug()<<m_regExp.cap(1)<<m_regExp.cap(2)<<m_regExp.cap(3)<<m_regExp.cap(4); //qDebug()<<"m_regExp"<<m_regExp.cap(1)<<m_regExp.cap(2)<<m_regExp.cap(5);
emit addToTaskWindow( emit addToTaskWindow(
m_regExp.cap(1), //filename m_regExp.cap(1), //filename
type, type,
m_regExp.cap(2).toInt(), //line number m_regExp.cap(2).toInt(), //line number
description); description);
} else if (m_regExpIncluded.indexIn(lne) > -1) { } else if (m_regExpIncluded.indexIn(lne) > -1) {
emit addToTaskWindow( emit addToTaskWindow(
m_regExpIncluded.cap(1), //filename m_regExpIncluded.cap(1), //filename
@@ -104,29 +107,7 @@ void GccParser::stdError(const QString & line)
m_regExpIncluded.cap(2).toInt(), //linenumber m_regExpIncluded.cap(2).toInt(), //linenumber
lne //description lne //description
); );
} else if (m_regExpLinker.indexIn(lne) > -1) { //qDebug()<<"m_regExpInclude"<<m_regExpIncluded.cap(1)<<m_regExpIncluded.cap(2);
ProjectExplorer::BuildParserInterface::PatternType type = ProjectExplorer::BuildParserInterface::Error;
QString description = m_regExpLinker.cap(2);
if (lne.endsWith(QLatin1Char(':'))) {
m_linkIndent = true;
} else if (m_linkIndent) {
description.prepend(QLatin1String("-> "));
type = ProjectExplorer::BuildParserInterface::Unknown;
}
emit addToTaskWindow(
m_regExpLinker.cap(1), //filename
type,
-1, //linenumber
description);
} else if (lne.startsWith(QLatin1String("collect2:"))) { } else if (lne.startsWith(QLatin1String("collect2:"))) {
emit addToTaskWindow( emit addToTaskWindow("", ProjectExplorer::BuildParserInterface::Error, -1, lne);
"", }}
ProjectExplorer::BuildParserInterface::Error,
-1,
lne //description
);
m_linkIndent = false;
} else {
m_linkIndent = false;
}
}

View File

@@ -54,7 +54,6 @@ private:
QRegExp m_regExpIncluded; QRegExp m_regExpIncluded;
QRegExp m_regExpLinker; QRegExp m_regExpLinker;
QRegExp m_makeDir; QRegExp m_makeDir;
bool m_linkIndent;
}; };
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -540,7 +540,7 @@ Qt4ProFileNode::~Qt4ProFileNode()
void Qt4ProFileNode::buildStateChanged(ProjectExplorer::Project *project) void Qt4ProFileNode::buildStateChanged(ProjectExplorer::Project *project)
{ {
if (project == m_project && !ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager()->isBuilding(m_project)) if (project == m_project && !ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager()->isBuilding(m_project))
updateUiFiles(); updateUiFiles(m_project->buildDirectory(m_project->activeBuildConfiguration()));
} }
bool Qt4ProFileNode::hasTargets() const bool Qt4ProFileNode::hasTargets() const
@@ -710,7 +710,7 @@ void Qt4ProFileNode::update()
emit qt4Watcher->variablesChanged(this, m_varValues, newVarValues); emit qt4Watcher->variablesChanged(this, m_varValues, newVarValues);
} }
updateUiFiles(); updateUiFiles(m_project->buildDirectory(m_project->activeBuildConfiguration()));
foreach (NodesWatcher *watcher, watchers()) foreach (NodesWatcher *watcher, watchers())
if (Qt4NodesWatcher *qt4Watcher = qobject_cast<Qt4NodesWatcher*>(watcher)) if (Qt4NodesWatcher *qt4Watcher = qobject_cast<Qt4NodesWatcher*>(watcher))
@@ -744,7 +744,7 @@ namespace {
// It does so by storing a modification time for each ui file we know about. // It does so by storing a modification time for each ui file we know about.
// TODO this function should also be called if the build directory is changed // TODO this function should also be called if the build directory is changed
void Qt4ProFileNode::updateUiFiles() void Qt4ProFileNode::updateUiFiles(const QString &buildDirectory)
{ {
// Only those two project types can have ui files for us // Only those two project types can have ui files for us
if (m_projectType != ApplicationTemplate if (m_projectType != ApplicationTemplate
@@ -757,7 +757,7 @@ void Qt4ProFileNode::updateUiFiles()
const QList<FileNode*> uiFiles = uiFilesVisitor.uiFileNodes; const QList<FileNode*> uiFiles = uiFilesVisitor.uiFileNodes;
// Find the UiDir, there can only ever be one // Find the UiDir, there can only ever be one
QString uiDir; // We should default to the build directory QString uiDir = buildDirectory;
QStringList tmp = m_varValues[UiDirVar]; QStringList tmp = m_varValues[UiDirVar];
if (tmp.size() != 0) if (tmp.size() != 0)
uiDir = tmp.first(); uiDir = tmp.first();

View File

@@ -187,7 +187,7 @@ public slots:
void scheduleUpdate(); void scheduleUpdate();
void update(); void update();
private slots: private slots:
void updateUiFiles(); void updateUiFiles(const QString& buildConfiguration);
void buildStateChanged(ProjectExplorer::Project*); void buildStateChanged(ProjectExplorer::Project*);
private: private:

View File

@@ -112,6 +112,7 @@ void QtVersionManager::addVersion(QtVersion *version)
{ {
m_versions.append(version); m_versions.append(version);
emit qtVersionsChanged(); emit qtVersionsChanged();
writeVersionsIntoSettings();
} }
void QtVersionManager::updateDocumentation() void QtVersionManager::updateDocumentation()

View File

@@ -3115,8 +3115,9 @@ bool TextBlockUserData::findPreviousOpenParenthesis(QTextCursor *cursor, bool se
if (!parenList.isEmpty() && !TextEditDocumentLayout::ifdefedOut(block)) { if (!parenList.isEmpty() && !TextEditDocumentLayout::ifdefedOut(block)) {
for (int i = parenList.count()-1; i >= 0; --i) { for (int i = parenList.count()-1; i >= 0; --i) {
Parenthesis paren = parenList.at(i); Parenthesis paren = parenList.at(i);
if (block == cursor->block() && position - block.position() <= paren.pos + 1) if (block == cursor->block() &&
continue; (position - block.position() <= paren.pos + (paren.type == Parenthesis::Closed ? 1 : 0)))
continue;
if (paren.type == Parenthesis::Closed) { if (paren.type == Parenthesis::Closed) {
++ignore; ++ignore;
} else if (ignore > 0) { } else if (ignore > 0) {

View File

@@ -143,7 +143,7 @@ void QtLocalPeer::receiveConnection()
return; return;
// Why doesn't Qt have a blocking stream that takes care of this shait??? // Why doesn't Qt have a blocking stream that takes care of this shait???
while (socket->bytesAvailable() < sizeof(quint32)) while (socket->bytesAvailable() < static_cast<int>(sizeof(quint32)))
socket->waitForReadyRead(); socket->waitForReadyRead();
QDataStream ds(socket); QDataStream ds(socket);
QByteArray uMsg; QByteArray uMsg;

View File

@@ -42,7 +42,7 @@
#include <QtCore/QDebug> #include <QtCore/QDebug>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
# define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3"; # define QT_INSTALL_DIR "C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more/Troll/4.4.3/qt";
const char * const oldInstallBase = QT_INSTALL_DIR; const char * const oldInstallBase = QT_INSTALL_DIR;
const char * const oldSourceBase = QT_INSTALL_DIR; const char * const oldSourceBase = QT_INSTALL_DIR;
@@ -108,7 +108,8 @@ bool patchBinariesWithQtPathes(const char *baseQtPath)
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
"/bin/qmake.exe", "/bin/qmake.exe",
"/bin/QtCore4.dll", "/bin/QtCore4.dll",
"/bin/QtCored4.dll" "/bin/QtCored4.dll",
"/lib/QtCored4.dll"
#else #else
"/bin/qmake", "/bin/qmake",
"/lib/libQtCore.so", "/lib/libQtCore.so",
@@ -136,7 +137,6 @@ char * allocFileNameCopyAppend(const char * textToCopy,
Q_ASSERT(textToAppend != NULL); Q_ASSERT(textToAppend != NULL);
if (textToAppend2 == NULL) if (textToAppend2 == NULL)
textToAppend2 = ""; textToAppend2 = "";
Q_ASSERT(textToAppend2 != NULL);
char * const res = new char[bytesToAllocate]; char * const res = new char[bytesToAllocate];
const size_t textToCopyLen = strlen(textToCopy); const size_t textToCopyLen = strlen(textToCopy);
@@ -153,7 +153,7 @@ char * allocFileNameCopyAppend(const char * textToCopy,
if (textToAppendLen > 0) if (textToAppendLen > 0)
strncpy(res + textToCopyLen, textToAppend, bytesToAllocate - textToCopyLen - 1); strncpy(res + textToCopyLen, textToAppend, bytesToAllocate - textToCopyLen - 1);
if (textToAppend2Len > 0) if (textToAppend2Len > 0)
strncpy(res + textToCopyLen + textToAppend2Len, textToAppend2, bytesToAllocate - textToCopyLen - textToAppend2Len - 1); strncpy(res + textToCopyLen + textToAppendLen, textToAppend2, bytesToAllocate - textToCopyLen - textToAppendLen - 1);
res[textToCopyLen + textToAppendLen + textToAppend2Len] = '\0'; res[textToCopyLen + textToAppendLen + textToAppend2Len] = '\0';
res[bytesToAllocate - 1] = '\0'; // Safe is safe res[bytesToAllocate - 1] = '\0'; // Safe is safe
return res; return res;
@@ -183,6 +183,19 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
{"/bin/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"}, {"/bin/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"},
{"/bin/QtXmld4.dll", "/src/xml/"}, {"/bin/QtXmld4.dll", "/src/xml/"},
{"/bin/QtXmlPatternsd4.dll", "/src/xmlpatterns/"}, {"/bin/QtXmlPatternsd4.dll", "/src/xmlpatterns/"},
{"/lib/Qt3Supportd4.dll", "/src/qt3support/"},
{"/lib/QtCored4.dll", "/src/corelib/"},
{"/lib/QtGuid4.dll", "/src/gui/"},
{"/lib/QtHelpd4.dll", "/tools/assistant/lib/"},
{"/lib/QtNetworkd4.dll", "/src/network/"},
{"/lib/QtOpenGLd4.dll", "/src/opengl/"},
{"/lib/QtScriptd4.dll", "/src/script/"},
{"/lib/QtSqld4.dll", "/src/sql/"},
{"/lib/QtSvgd4.dll", "/src/svg/"},
{"/lib/QtTestd4.dll", "/src/testlib/"},
{"/lib/QtWebKitd4.dll", "/src/3rdparty/webkit/WebCore/"},
{"/lib/QtXmld4.dll", "/src/xml/"},
{"/lib/QtXmlPatternsd4.dll", "/src/xmlpatterns/"},
{"/plugins/accessible/qtaccessiblecompatwidgetsd4.dll", "/src/plugins/accessible/compat/"}, {"/plugins/accessible/qtaccessiblecompatwidgetsd4.dll", "/src/plugins/accessible/compat/"},
{"/plugins/accessible/qtaccessiblewidgetsd4.dll", "/src/plugins/accessible/widgets/"}, {"/plugins/accessible/qtaccessiblewidgetsd4.dll", "/src/plugins/accessible/widgets/"},
{"/plugins/codecs/qcncodecsd4.dll", "/src/plugins/codecs/cn/"}, {"/plugins/codecs/qcncodecsd4.dll", "/src/plugins/codecs/cn/"},

View File

@@ -1,4 +1,5 @@
load(qttest_p4) TEMPLATE = app
CONFIG += qt warn_on console depend_includepath
QT = core testlib
include(../shared/shared.pri) include(../shared/shared.pri)
QT = core
SOURCES += tst_ast.cpp SOURCES += tst_ast.cpp

View File

@@ -1,5 +1,6 @@
load(qttest_p4) TEMPLATE = app
CONFIG += qt warn_on console depend_includepath
QT = core testlib
include(../shared/shared.pri) include(../shared/shared.pri)
QT = core
SOURCES += tst_semantic.cpp SOURCES += tst_semantic.cpp