Skip to content

Commit

Permalink
Simplify code by removing public function that was called only once
Browse files Browse the repository at this point in the history
  • Loading branch information
hallarempt committed Sep 27, 2019
1 parent 3330d7e commit 35cfa74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
12 changes: 4 additions & 8 deletions libs/ui/KisWelcomePageWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ void KisWelcomePageWidget::setMainWindow(KisMainWindow* mainWin)
}
}

bool KisWelcomePageWidget::isDevelopmentBuild()
{
// dev builds contain GIT hash in it and the word git
// stable versions do not contain this
return qApp->applicationVersion().contains("git");
}

void KisWelcomePageWidget::showDropAreaIndicator(bool show)
{
Expand Down Expand Up @@ -349,8 +343,10 @@ void KisWelcomePageWidget::slotUpdateVersionMessage()
alertIcon->setIcon(KisIconUtils::loadIcon("warning"));
alertIcon->setVisible(false);

// find out if we need an update...or if this is a development version
if (isDevelopmentBuild()) {
// find out if we need an update...or if this is a development version:
// dev builds contain GIT hash in it and the word git
// stable versions do not contain this.
if (qApp->applicationVersion().contains("git")) {
// Development build
QString versionLabelText = QString("<a style=\"color: " +
blendedColor.name() +
Expand Down
2 changes: 0 additions & 2 deletions libs/ui/KisWelcomePageWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class KRITAUI_EXPORT KisWelcomePageWidget : public QWidget, public Ui::KisWelcom

void setMainWindow(KisMainWindow* m_mainWindow);

bool isDevelopmentBuild();

public Q_SLOTS:
/// if a document is placed over this area, a dotted line will appear as an indicator
/// that it is a droppable area. KisMainwindow is what triggers this
Expand Down

0 comments on commit 35cfa74

Please sign in to comment.