Commit 27a7af36 authored by dt's avatar dt
Browse files

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents f9322928 9cd7faa8
......@@ -2473,16 +2473,16 @@ background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0
</context>
<context>
<name>CppFileSettingsPage</name>
<message>
<location filename="../../../src/plugins/cpptools/cpptoolsconstants.h" line="+52"/>
<source>File naming conventions</source>
<translation>Konventionen für die Bildung von Dateinamen</translation>
</message>
<message>
<location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/>
<source>Header suffix:</source>
<translation>Endung für Header-Dateien:</translation>
</message>
<message>
<location/>
<source>File naming conventions</source>
<translation>Konventionen für die Bildung von Dateinamen</translation>
</message>
<message>
<location/>
<source>This determines how the file names of the class wizards are generated (&quot;MyClass.h&quot; versus &quot;myclass.h&quot;).</source>
......@@ -4408,16 +4408,16 @@ Es wird empfohlen, gdb 6.7 oder später zu benutzen.</translation>
</context>
<context>
<name>DebuggingHelperOptionPage</name>
<message>
<location filename="../../../src/plugins/debugger/debuggerplugin.cpp" line="-596"/>
<source>Debugging Helper</source>
<translation>Ausgabe-Hilfsbibliothek</translation>
</message>
<message>
<location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/>
<source>This will enable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</source>
<translation>Diese Einstellung ermöglicht die Anzeige von Qt- und Standardbibliotheksobjekten in der Ansicht &quot;Lokale Variablen und Über&amp;wachte Ausdrücke&quot;</translation>
</message>
<message>
<location/>
<source>Debugging Helper</source>
<translation>Ausgabe-Hilfsbibliothek</translation>
</message>
<message>
<location/>
<source>Use debugging helper</source>
......@@ -5329,8 +5329,8 @@ Grund: %3</translation>
<name>FilterSettingsPage</name>
<message>
<location filename="../../../src/plugins/help/filtersettingspage.ui"/>
<source>Filter:</source>
<translation>Filter:</translation>
<source>Filters</source>
<translation>Filter</translation>
</message>
<message>
<location/>
......
......@@ -2301,16 +2301,16 @@ p {
</context>
<context>
<name>CppFileSettingsPage</name>
<message>
<location filename="../../../src/plugins/cpptools/cpptoolsconstants.h" line="+52"/>
<source>File naming conventions</source>
<translation>Convenzioni sul nome dei file</translation>
</message>
<message>
<location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/>
<source>Header suffix:</source>
<translation>Estensione header:</translation>
</message>
<message>
<location/>
<source>File naming conventions</source>
<translation>Convenzioni sul nome dei file</translation>
</message>
<message>
<location/>
<source>This determines how the file names of the class wizards are generated (&quot;MyClass.h&quot; versus &quot;myclass.h&quot;).</source>
......@@ -4058,16 +4058,16 @@ L&apos;utilizzo di gdb 6.7 o successivi è fortemente consigliato.</translation>
</context>
<context>
<name>DebuggingHelperOptionPage</name>
<message>
<location filename="../../../src/plugins/debugger/debuggerplugin.cpp" line="-596"/>
<source>Debugging Helper</source>
<translation>Helper del Debug</translation>
</message>
<message>
<location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/>
<source>This will enable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</source>
<translation>Marcando questa casella si abilita la visualizzazione dei tipi Qt e STL nella vista Variabili Locali &amp; Osservazione</translation>
</message>
<message>
<location/>
<source>Debugging Helper</source>
<translation>Helper del Debug</translation>
</message>
<message>
<location/>
<source>Use debugging helper</source>
......@@ -4931,8 +4931,8 @@ Causa: %3</translation>
<name>FilterSettingsPage</name>
<message>
<location filename="../../../src/plugins/help/filtersettingspage.ui"/>
<source>Filter:</source>
<translation>Filtro:</translation>
<source>Filters</source>
<translation>Filtri</translation>
</message>
<message>
<location/>
......
......@@ -2224,16 +2224,16 @@ background-image: url(:/core/images/welcomemode/feedback-bar-background.png);
</context>
<context>
<name>CppFileSettingsPage</name>
<message>
<location filename="../../../src/plugins/cpptools/cpptoolsconstants.h" line="+51"/>
<source>File naming conventions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../src/plugins/cpptools/cppfilesettingspage.ui"/>
<source>Form</source>
<translation type="unfinished">フォーム</translation>
</message>
<message>
<location/>
<source>File naming conventions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location/>
<source>Header suffix:</source>
......@@ -3718,16 +3718,16 @@ Using gdb 6.7 or later is strongly recommended.</source>
</context>
<context>
<name>DebuggingHelperOptionPage</name>
<message>
<location filename="../../../src/plugins/debugger/debuggerplugin.cpp" line="-596"/>
<source>Debugging Helper</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../src/plugins/debugger/dumperoptionpage.ui"/>
<source>Form</source>
<translation type="unfinished">フォーム</translation>
</message>
<message>
<location/>
<source>Debugging Helper</source>
<translation type="unfinished"></translation>
</message>
<message>
<location/>
<source>This will enable nice display of Qt and Standard Library objects in the Locals&amp;Watchers view</source>
......@@ -4662,7 +4662,7 @@ Reason: %3</source>
</message>
<message>
<location/>
<source>Filter:</source>
<source>Filters</source>
<translation type="unfinished"></translation>
</message>
<message>
......
......@@ -176,7 +176,7 @@ QList<Symbol *> LookupContext::resolve(Name *name, const QList<Scope *> &visible
scopes.clear();
foreach (Symbol *candidate, candidates) {
if (ScopedSymbol *scoped = candidate->asScopedSymbol()) {
scopes.append(scoped->members());
expand(scoped->members(), visibleScopes, &scopes);
}
}
}
......
......@@ -294,8 +294,8 @@ protected:
init(&decl, node);
decl.text.fill(QLatin1Char(' '), _depth);
if (node->qualifiedObjectNameId)
decl.text.append(asString(node->qualifiedObjectNameId));
if (node->qualifiedTypeNameId)
decl.text.append(asString(node->qualifiedTypeNameId));
else
decl.text.append(QLatin1Char('?'));
......@@ -321,8 +321,8 @@ protected:
decl.text.append(asString(node->qualifiedId));
decl.text.append(QLatin1String(": "));
if (node->qualifiedObjectNameId)
decl.text.append(asString(node->qualifiedObjectNameId));
if (node->qualifiedTypeNameId)
decl.text.append(asString(node->qualifiedTypeNameId));
else
decl.text.append(QLatin1Char('?'));
......
......@@ -308,7 +308,7 @@ void GenericProject::setToolChainId(const QString &toolChainId)
} else if (toolChainId == QLatin1String("msvc")) {
const QString msvcVersion; // ### FIXME
m_toolChain = ToolChain::createMSVCToolChain(msvcVersion);
m_toolChain = ToolChain::createMSVCToolChain(msvcVersion, false);
} else if (toolChainId == QLatin1String("wince")) {
const QString msvcVersion, wincePlatform; // ### FIXME
......
......@@ -10,56 +10,78 @@
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" colspan="2" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Filter:</string>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_2" >
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="text" >
<string>Attributes:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QListWidget" name="filterWidget" />
</item>
<item rowspan="2" row="1" column="2" >
<widget class="QTreeWidget" name="attributeWidget" >
<property name="showDropIndicator" stdset="0" >
<bool>false</bool>
</property>
<property name="rootIsDecorated" >
<bool>false</bool>
</property>
<property name="uniformRowHeights" >
<bool>true</bool>
</property>
<column>
<property name="text" >
<string>1</string>
</property>
</column>
</widget>
</item>
<item row="2" column="0" >
<widget class="QPushButton" name="filterAddButton" >
<property name="text" >
<string>Add</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QPushButton" name="filterRemoveButton" >
<property name="text" >
<string>Remove</string>
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Filters</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QListWidget" name="filterWidget" />
</item>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Attributes</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QTreeWidget" name="attributeWidget" >
<property name="showDropIndicator" stdset="0" >
<bool>false</bool>
</property>
<property name="rootIsDecorated" >
<bool>false</bool>
</property>
<property name="uniformRowHeights" >
<bool>true</bool>
</property>
<column>
<property name="text" >
<string>1</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="QPushButton" name="filterAddButton" >
<property name="text" >
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="filterRemoveButton" >
<property name="text" >
<string>Remove</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
......
......@@ -62,11 +62,16 @@ SearchWidget::SearchWidget(QHelpSearchEngine *engine, QWidget *parent)
setFocusProxy(queryWidget);
connect(queryWidget, SIGNAL(search()), this, SLOT(search()));
connect(resultWidget, SIGNAL(requestShowLink(const QUrl&)),
this, SIGNAL(requestShowLink(const QUrl&)));
connect(resultWidget, SIGNAL(requestShowLink(QUrl)), this,
SIGNAL(requestShowLink(QUrl)));
connect(searchEngine, SIGNAL(searchingStarted()), this, SLOT(searchingStarted()));
connect(searchEngine, SIGNAL(searchingFinished(int)), this, SLOT(searchingFinished(int)));
connect(searchEngine, SIGNAL(searchingStarted()), this,
SLOT(searchingStarted()));
connect(searchEngine, SIGNAL(searchingFinished(int)), this,
SLOT(searchingFinished(int)));
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
browser->viewport()->installEventFilter(this);
}
SearchWidget::~SearchWidget()
......@@ -76,10 +81,6 @@ SearchWidget::~SearchWidget()
void SearchWidget::zoomIn()
{
#ifndef QT_CLUCENE_SUPPORT
return;
#endif
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (browser && zoomCount != 10) {
zoomCount++;
......@@ -89,10 +90,6 @@ void SearchWidget::zoomIn()
void SearchWidget::zoomOut()
{
#ifndef QT_CLUCENE_SUPPORT
return;
#endif
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (browser && zoomCount != -5) {
zoomCount--;
......@@ -102,10 +99,6 @@ void SearchWidget::zoomOut()
void SearchWidget::resetZoom()
{
#ifndef QT_CLUCENE_SUPPORT
return;
#endif
if (zoomCount == 0)
return;
......@@ -133,6 +126,24 @@ void SearchWidget::searchingFinished(int hits)
qApp->restoreOverrideCursor();
}
bool SearchWidget::eventFilter(QObject* o, QEvent *e)
{
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (browser && o == browser->viewport()
&& e->type() == QEvent::MouseButtonRelease){
QMouseEvent *me = static_cast<QMouseEvent*>(e);
QUrl link = resultWidget->linkAt(me->pos());
if (!link.isEmpty() || link.isValid()) {
bool controlPressed = me->modifiers() & Qt::ControlModifier;
if((me->button() == Qt::LeftButton && controlPressed)
|| (me->button() == Qt::MidButton)) {
emit requestShowLinkInNewTab(link);
}
}
}
return QWidget::eventFilter(o,e);
}
void SearchWidget::keyPressEvent(QKeyEvent *keyEvent)
{
if (keyEvent->key() == Qt::Key_Escape)
......@@ -144,7 +155,6 @@ void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent)
QMenu menu;
QPoint point = contextMenuEvent->globalPos();
#ifdef QT_CLUCENE_SUPPORT
QTextBrowser* browser = qFindChild<QTextBrowser*>(resultWidget);
if (!browser)
return;
......@@ -155,22 +165,25 @@ void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent)
QUrl link = browser->anchorAt(point);
QAction *copyAction = menu.addAction(tr("&Copy") +
QString(QLatin1String("\t") + QString(QKeySequence(Qt::CTRL | Qt::Key_C))));
QKeySequence keySeq(QKeySequence::Copy);
QAction *copyAction = menu.addAction(tr("&Copy") + QLatin1String("\t") +
keySeq.toString(QKeySequence::NativeText));
copyAction->setEnabled(QTextCursor(browser->textCursor()).hasSelection());
QAction *copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
keySeq = QKeySequence(Qt::CTRL);
QAction *newTabAction = menu.addAction(tr("Open Link in New Tab") +
QString(QLatin1String("\t") + QString(QKeySequence(Qt::CTRL))) +
QLatin1String("\t") + keySeq.toString(QKeySequence::NativeText) +
QLatin1String("LMB"));
newTabAction->setEnabled(!link.isEmpty() && link.isValid());
menu.addSeparator();
keySeq = QKeySequence::SelectAll;
QAction *selectAllAction = menu.addAction(tr("Select All") +
QString(QLatin1String("\t") + QString(QKeySequence(Qt::CTRL | Qt::Key_A))));
QLatin1String("\t") + keySeq.toString(QKeySequence::NativeText));
QAction *usedAction = menu.exec(mapToGlobal(contextMenuEvent->pos()));
if (usedAction == copyAction) {
......@@ -191,19 +204,4 @@ void SearchWidget::contextMenuEvent(QContextMenuEvent *contextMenuEvent)
else if (usedAction == selectAllAction) {
browser->selectAll();
}
#else
point = resultWidget->mapFromGlobal(point);
QUrl link = resultWidget->linkAt(point);
if (link.isEmpty() || !link.isValid())
return;
QAction *curTab = menu.addAction(tr("Open Link"));
QAction *newTab = menu.addAction(tr("Open Link in New Tab"));
QAction *action = menu.exec(mapToGlobal(contextMenuEvent->pos()));
if (curTab == action)
emit requestShowLink(link);
else if (newTab == action)
emit requestShowLinkInNewTab(link);
#endif
}
......@@ -69,6 +69,7 @@ private slots:
void searchingFinished(int hits);
private:
bool eventFilter(QObject* o, QEvent *e);
void keyPressEvent(QKeyEvent *keyEvent);
void contextMenuEvent(QContextMenuEvent *contextMenuEvent);
......
......@@ -52,7 +52,7 @@ QString ProjectExplorerSettingsPage::id() const
QString ProjectExplorerSettingsPage::trName() const
{
return tr("Build and Run Settings");
return tr("Build and Run");
}
QString ProjectExplorerSettingsPage::category() const
......
......@@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>541</width>
<height>358</height>
<width>296</width>
<height>152</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Build Settings</string>
<string>Build and Run</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
......@@ -24,15 +24,6 @@
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Run Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="buildProjectBeforeRunCheckBox">
<property name="text">
......
......@@ -70,9 +70,9 @@ ToolChain *ToolChain::createMinGWToolChain(const QString &gcc, const QString &mi
return new MinGWToolChain(gcc, mingwPath);
}
ToolChain *ToolChain::createMSVCToolChain(const QString &name)
ToolChain *ToolChain::createMSVCToolChain(const QString &name, bool amd64 = false)
{
return new MSVCToolChain(name);
return new MSVCToolChain(name, amd64);
}
ToolChain *ToolChain::createWinCEToolChain(const QString &name, const QString &platform)
......@@ -85,6 +85,7 @@ QStringList ToolChain::availableMSVCVersions()
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7",
QSettings::NativeFormat);
QStringList versions = registry.allKeys();
// qDebug() << "AVAILABLE MSVC VERSIONS:" << versions;
return versions;
}
......@@ -226,14 +227,15 @@ QString MinGWToolChain::makeCommand() const
}
MSVCToolChain::MSVCToolChain(const QString &name)
: m_name(name), m_valuesSet(false)
MSVCToolChain::MSVCToolChain(const QString &name, bool amd64)
: m_name(name), m_valuesSet(false), m_amd64(amd64)
{
if (m_name.isEmpty()) { // Could be because system qt doesn't set this
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7",
QSettings::NativeFormat);
if (registry.allKeys().count())
m_name = registry.allKeys().first();
QStringList keys = registry.allKeys();
if (keys.count())
m_name = keys.first();
}
}
......@@ -283,7 +285,12 @@ void MSVCToolChain::addToEnvironment(ProjectExplorer::Environment &env)
return;
QString path = registry.value(m_name).toString();
QString desc;
QString varsbat = path + "Common7\\Tools\\vsvars32.bat";
QString varsbat;
if (m_amd64)
varsbat = path + "VC\\bin\\amd64\\vcvarsamd64.bat";
else
varsbat = path + "Common7\\Tools\\vsvars32.bat";
// qDebug() << varsbat;
if (QFileInfo(varsbat).exists()) {
QTemporaryFile tf(QDir::tempPath() + "\\XXXXXX.bat");
if (!tf.open())
......@@ -378,8 +385,9 @@ void WinCEToolChain::addToEnvironment(ProjectExplorer::Environment &env)
{
MSVCToolChain::addToEnvironment(env);
QSettings registry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7",
QSettings::NativeFormat);
QSettings::NativeFormat);
QString path = registry.value(m_name).toString();
// Find MSVC path
path += "/";
......
......@@ -90,7 +90,7 @@ public:
// Factory methods
static ToolChain *createGccToolChain(const QString &gcc);
static ToolChain *createMinGWToolChain(const QString &gcc, const QString &mingwPath);
static ToolChain *createMSVCToolChain(const QString &name);
static ToolChain *createMSVCToolChain(const QString &name, bool amd64);
static ToolChain *createWinCEToolChain(const QString &name, const QString &platform);