Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jan 25, 2019
1 parent cd21ea7 commit 5dadc8b
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 47 deletions.
Expand Up @@ -453,15 +453,6 @@ void CellmlTextViewWidget::retranslateUi()

//==============================================================================

bool CellmlTextViewWidget::contains(const QString &pFileName) const
{
// Return whether we know about the given file

return mData.contains(pFileName);
}

//==============================================================================

void CellmlTextViewWidget::initialize(const QString &pFileName, bool pUpdate)
{
// Retrieve the editing widget associated with the given file, if any
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/editing/CellMLTextView/src/cellmltextviewwidget.h
Expand Up @@ -139,8 +139,6 @@ class CellmlTextViewWidget : public Core::ViewWidget

void retranslateUi() override;

bool contains(const QString &pFileName) const;

void initialize(const QString &pFileName, bool pUpdate = true);
void finalize(const QString &pFileName);

Expand Down
11 changes: 1 addition & 10 deletions src/plugins/editing/RawCellMLView/src/rawcellmlviewwidget.cpp
Expand Up @@ -102,15 +102,6 @@ void RawCellmlViewWidget::retranslateUi()

//==============================================================================

bool RawCellmlViewWidget::contains(const QString &pFileName) const
{
// Return whether we know about the given file

return mEditingWidgets.contains(pFileName);
}

//==============================================================================

void RawCellmlViewWidget::initialize(const QString &pFileName, bool pUpdate)
{
// Retrieve the editing widget associated with the given file, if any
Expand Down Expand Up @@ -240,7 +231,7 @@ void RawCellmlViewWidget::fileReloaded(const QString &pFileName)
// file). However, we want to the 'old' file to remain the active one,
// hence the extra argument we pass to initialize()...

if (contains(pFileName)) {
if (mEditingWidgets.contains(pFileName)) {
bool update = mEditingWidget == mEditingWidgets.value(pFileName);

finalize(pFileName);
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/editing/RawCellMLView/src/rawcellmlviewwidget.h
Expand Up @@ -67,8 +67,6 @@ class RawCellmlViewWidget : public Core::ViewWidget

void retranslateUi() override;

bool contains(const QString &pFileName) const;

void initialize(const QString &pFileName, bool pUpdate = true);
void finalize(const QString &pFileName);

Expand Down
11 changes: 1 addition & 10 deletions src/plugins/editing/RawSEDMLView/src/rawsedmlviewwidget.cpp
Expand Up @@ -93,15 +93,6 @@ void RawSedmlViewWidget::retranslateUi()

//==============================================================================

bool RawSedmlViewWidget::contains(const QString &pFileName) const
{
// Return whether we know about the given file

return mEditingWidgets.contains(pFileName);
}

//==============================================================================

void RawSedmlViewWidget::initialize(const QString &pFileName, bool pUpdate)
{
// Retrieve the editing widget associated with the given file, if any
Expand Down Expand Up @@ -220,7 +211,7 @@ void RawSedmlViewWidget::fileReloaded(const QString &pFileName)
// file). However, we want to the 'old' file to remain the active one,
// hence the extra argument we pass to initialize()...

if (contains(pFileName)) {
if (mEditingWidgets.contains(pFileName)) {
bool update = mEditingWidget == mEditingWidgets.value(pFileName);

finalize(pFileName);
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/editing/RawSEDMLView/src/rawsedmlviewwidget.h
Expand Up @@ -66,8 +66,6 @@ class RawSedmlViewWidget : public Core::ViewWidget

void retranslateUi() override;

bool contains(const QString &pFileName) const;

void initialize(const QString &pFileName, bool pUpdate = true);
void finalize(const QString &pFileName);

Expand Down
11 changes: 1 addition & 10 deletions src/plugins/editing/RawTextView/src/rawtextviewwidget.cpp
Expand Up @@ -81,15 +81,6 @@ void RawTextViewWidget::retranslateUi()

//==============================================================================

bool RawTextViewWidget::contains(const QString &pFileName) const
{
// Return whether we know about the given file

return mEditors.contains(pFileName);
}

//==============================================================================

void RawTextViewWidget::initialize(const QString &pFileName, bool pUpdate)
{
// Retrieve the editor associated with the given file, if any
Expand Down Expand Up @@ -206,7 +197,7 @@ void RawTextViewWidget::fileReloaded(const QString &pFileName)
// file). However, we want to the 'old' file to remain the active one,
// hence the extra argument we pass to initialize()...

if (contains(pFileName)) {
if (mEditors.contains(pFileName)) {
bool update = mEditor == mEditors.value(pFileName);

finalize(pFileName);
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/editing/RawTextView/src/rawtextviewwidget.h
Expand Up @@ -59,8 +59,6 @@ class RawTextViewWidget : public Core::ViewWidget

void retranslateUi() override;

bool contains(const QString &pFileName) const;

void initialize(const QString &pFileName, bool pUpdate = true);
void finalize(const QString &pFileName);

Expand Down

0 comments on commit 5dadc8b

Please sign in to comment.