forked from qt-creator/qt-creator
Code cosmetics
This commit is contained in:
@@ -283,6 +283,6 @@ void QDeclarativeDebugClient::messageReceived(const QByteArray &)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace QmlJsDebugClient
|
||||
|
||||
#include <qdeclarativedebugclient.moc>
|
||||
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
DebuggerLanguages m_supportedLanguages;
|
||||
|
||||
QStackedWidget *m_toolbarStack;
|
||||
QStackedWidget *m_toolBarStack;
|
||||
|
||||
QHash<DebuggerLanguage, Context> m_contextsForLanguage;
|
||||
|
||||
@@ -147,7 +147,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *mw)
|
||||
: q(mw)
|
||||
, m_resizeEventFilter(this)
|
||||
, m_supportedLanguages(AnyLanguage)
|
||||
, m_toolbarStack(new QStackedWidget)
|
||||
, m_toolBarStack(new QStackedWidget)
|
||||
, m_inDebugMode(false)
|
||||
, m_changingUI(false)
|
||||
, m_previousDebugLanguages(AnyLanguage)
|
||||
@@ -340,7 +340,7 @@ void DebuggerMainWindowPrivate::activateQmlCppLayout()
|
||||
qmlCppContext.add(m_contextsForLanguage.value(CppLanguage));
|
||||
|
||||
// always use cpp toolbar
|
||||
m_toolbarStack->setCurrentWidget(m_toolBars.value(CppLanguage));
|
||||
m_toolBarStack->setCurrentWidget(m_toolBars.value(CppLanguage));
|
||||
|
||||
if (m_previousDebugLanguages & QmlLanguage) {
|
||||
m_dockWidgetActiveStateQmlCpp = q->saveSettings();
|
||||
@@ -360,7 +360,7 @@ void DebuggerMainWindowPrivate::activateCppLayout()
|
||||
ICore *core = ICore::instance();
|
||||
Context qmlCppContext = m_contextsForLanguage.value(QmlLanguage);
|
||||
qmlCppContext.add(m_contextsForLanguage.value(CppLanguage));
|
||||
m_toolbarStack->setCurrentWidget(m_toolBars.value(CppLanguage));
|
||||
m_toolBarStack->setCurrentWidget(m_toolBars.value(CppLanguage));
|
||||
|
||||
if (m_previousDebugLanguages & QmlLanguage) {
|
||||
m_dockWidgetActiveStateQmlCpp = q->saveSettings();
|
||||
@@ -377,11 +377,11 @@ void DebuggerMainWindowPrivate::activateCppLayout()
|
||||
core->updateAdditionalContexts(Context(), cppContext);
|
||||
}
|
||||
|
||||
void DebuggerMainWindow::setToolbar(const DebuggerLanguage &language, QWidget *widget)
|
||||
void DebuggerMainWindow::setToolBar(const DebuggerLanguage &language, QWidget *widget)
|
||||
{
|
||||
Q_ASSERT(d->m_toolBars.contains(language));
|
||||
d->m_toolBars[language] = widget;
|
||||
d->m_toolbarStack->addWidget(widget);
|
||||
d->m_toolBarStack->addWidget(widget);
|
||||
}
|
||||
|
||||
QDockWidget *DebuggerMainWindow::dockWidget(const QString &objectName) const
|
||||
@@ -468,7 +468,7 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
|
||||
QHBoxLayout *debugToolBarLayout = new QHBoxLayout(debugToolBar);
|
||||
debugToolBarLayout->setMargin(0);
|
||||
debugToolBarLayout->setSpacing(0);
|
||||
debugToolBarLayout->addWidget(d->m_toolbarStack);
|
||||
debugToolBarLayout->addWidget(d->m_toolBarStack);
|
||||
debugToolBarLayout->addStretch();
|
||||
debugToolBarLayout->addWidget(new Utils::StyledSeparator);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
~DebuggerMainWindow();
|
||||
|
||||
// Debugger toolbars are registered with this function.
|
||||
void setToolbar(const DebuggerLanguage &language, QWidget *widget);
|
||||
void setToolBar(const DebuggerLanguage &language, QWidget *widget);
|
||||
|
||||
// Active languages to be debugged.
|
||||
DebuggerLanguages activeDebugLanguages() const;
|
||||
|
||||
@@ -3129,7 +3129,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
||||
hbox->addSpacerItem(new QSpacerItem(4, 0));
|
||||
hbox->addWidget(m_statusLabel, 10);
|
||||
|
||||
m_mainWindow->setToolbar(CppLanguage, toolbarContainer);
|
||||
m_mainWindow->setToolBar(CppLanguage, toolbarContainer);
|
||||
|
||||
connect(action(EnableReverseDebugging),
|
||||
SIGNAL(valueChanged(QVariant)),
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace Internal {
|
||||
class QmlInspectorToolBar : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum DesignTool {
|
||||
NoTool = 0,
|
||||
|
||||
@@ -666,8 +666,7 @@ void InspectorUi::gotoObjectReferenceDefinition(const QDeclarativeDebugObjectRef
|
||||
|
||||
if (textEditor) {
|
||||
QDeclarativeDebugObjectReference ref = objectReferenceForLocation(fileName);
|
||||
if (ref.debugId() != obj.debugId())
|
||||
{
|
||||
if (ref.debugId() != obj.debugId()) {
|
||||
m_selectionCallbackExpected = true;
|
||||
editorManager->addCurrentPositionToNavigationHistory();
|
||||
textEditor->gotoLine(source.lineNumber());
|
||||
@@ -723,7 +722,7 @@ void InspectorUi::setupDockWidgets()
|
||||
|
||||
void InspectorUi::crumblePathElementClicked(int debugId)
|
||||
{
|
||||
QList <int> l;
|
||||
QList<int> l;
|
||||
l << debugId;
|
||||
selectItems(l);
|
||||
}
|
||||
|
||||
@@ -154,12 +154,8 @@ bool QmlRunControlFactory::canRun(RunConfiguration *runConfiguration,
|
||||
if (config && qmlDebugSupportInstalled) {
|
||||
if (!config->observerPath().isEmpty())
|
||||
return true;
|
||||
|
||||
if (config->qtVersion() && Qt4ProjectManager::QmlObserverTool::canBuild(config->qtVersion())) {
|
||||
if (config->qtVersion() && Qt4ProjectManager::QmlObserverTool::canBuild(config->qtVersion()))
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -172,11 +168,10 @@ RunControl *QmlRunControlFactory::create(RunConfiguration *runConfiguration,
|
||||
|
||||
QmlProjectRunConfiguration *config = qobject_cast<QmlProjectRunConfiguration *>(runConfiguration);
|
||||
RunControl *runControl = 0;
|
||||
if (mode == ProjectExplorer::Constants::RUNMODE) {
|
||||
runControl = new QmlRunControl(config, mode);
|
||||
} else if (mode == Debugger::Constants::DEBUGMODE) {
|
||||
if (mode == ProjectExplorer::Constants::RUNMODE)
|
||||
runControl = new QmlRunControl(config, mode);
|
||||
else if (mode == Debugger::Constants::DEBUGMODE)
|
||||
runControl = createDebugRunControl(config);
|
||||
}
|
||||
return runControl;
|
||||
}
|
||||
|
||||
@@ -212,7 +207,8 @@ RunControl *QmlRunControlFactory::createDebugRunControl(QmlProjectRunConfigurati
|
||||
return Debugger::DebuggerPlugin::createDebugger(params, runConfig);
|
||||
}
|
||||
|
||||
void QmlRunControlFactory::showQmlObserverToolWarning() {
|
||||
void QmlRunControlFactory::showQmlObserverToolWarning()
|
||||
{
|
||||
QMessageBox dialog(QApplication::activeWindow());
|
||||
QPushButton *qtPref = dialog.addButton(tr("Open Qt4 Options"),
|
||||
QMessageBox::ActionRole);
|
||||
@@ -236,4 +232,3 @@ void QmlRunControlFactory::showQmlObserverToolWarning() {
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlProjectManager
|
||||
|
||||
|
||||
@@ -5748,10 +5748,10 @@ BaseTextEditorEditable::BaseTextEditorEditable(BaseTextEditor *editor)
|
||||
using namespace Find;
|
||||
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
|
||||
BaseTextFind *baseTextFind = new BaseTextFind(editor);
|
||||
connect(baseTextFind, SIGNAL(highlightAll(QString, Find::FindFlags)),
|
||||
editor, SLOT(highlightSearchResults(QString, Find::FindFlags)));
|
||||
connect(baseTextFind, SIGNAL(findScopeChanged(QTextCursor, QTextCursor, int, int)),
|
||||
editor, SLOT(setFindScope(QTextCursor, QTextCursor, int, int)));
|
||||
connect(baseTextFind, SIGNAL(highlightAll(QString,Find::FindFlags)),
|
||||
editor, SLOT(highlightSearchResults(QString,Find::FindFlags)));
|
||||
connect(baseTextFind, SIGNAL(findScopeChanged(QTextCursor,QTextCursor,int,int)),
|
||||
editor, SLOT(setFindScope(QTextCursor,QTextCursor,int,int)));
|
||||
aggregate->add(baseTextFind);
|
||||
aggregate->add(editor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user