Commit a0f1473d authored by Tim Jenssen's avatar Tim Jenssen
Browse files

QmlDesigner: remove unnecessary code



Change-Id: Ib10fa0513f326b3047b93f8cbedc1a11f2bd1f90
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent e25ac57f
......@@ -248,21 +248,6 @@ void DesignModeWidget::updateErrorStatus(const QList<RewriterError> &errors)
}
}
TextEditor::BaseTextEditor *DesignModeWidget::textEditor() const
{
return currentDesignDocument()->textEditor();
}
void DesignModeWidget::setCurrentDesignDocument(DesignDocument *newDesignDocument)
{
if (debug)
qDebug() << Q_FUNC_INFO << newDesignDocument;
//viewManager().setDesignDocument(newDesignDocument);
}
static void hideToolButtons(QList<QToolButton*> &buttons)
{
foreach (QToolButton *button, buttons)
......@@ -319,13 +304,10 @@ void DesignModeWidget::setup()
m_warningWidget->setVisible(false);
connect(m_warningWidget.data(), &DocumentWarningWidget::gotoCodeClicked, [=]
(const QString &filePath, int codeLine, int codeColumn) {
Q_UNUSED(filePath);
QTC_ASSERT(textEditor(), return;);
QTC_ASSERT(textEditor()->textDocument()->filePath().toString() == filePath,
qDebug() << Q_FUNC_INFO << textEditor()->textDocument()->filePath().toString() << filePath; );
textEditor()->gotoLine(codeLine, codeColumn);
if (currentDesignDocument() && currentDesignDocument()->textEditor())
currentDesignDocument()->textEditor()->gotoLine(codeLine, codeColumn);
Core::ModeManager::activateMode(Core::Constants::MODE_EDIT);
});
......
......@@ -68,8 +68,6 @@ public:
void readSettings();
void saveSettings();
TextEditor::BaseTextEditor *textEditor() const;
DesignDocument *currentDesignDocument() const;
ViewManager &viewManager();
......@@ -97,7 +95,6 @@ private slots:
private: // functions
enum InitializeStatus { NotInitialized, Initializing, Initialized };
void setCurrentDesignDocument(DesignDocument *newDesignDocument);
void setup();
bool isInNodeDefinition(int nodeOffset, int nodeLength, int cursorPos) const;
QmlDesigner::ModelNode nodeForPosition(int cursorPos) const;
......
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