From 32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Thu, 19 Sep 2019 00:41:48 -0700 Subject: merged from 0.6.7 codebase --- application/dialogs/ModEditDialogCommon.cpp | 40 ----------------------------- 1 file changed, 40 deletions(-) delete mode 100644 application/dialogs/ModEditDialogCommon.cpp (limited to 'application/dialogs/ModEditDialogCommon.cpp') diff --git a/application/dialogs/ModEditDialogCommon.cpp b/application/dialogs/ModEditDialogCommon.cpp deleted file mode 100644 index 4201bdad..00000000 --- a/application/dialogs/ModEditDialogCommon.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "ModEditDialogCommon.h" -#include "CustomMessageBox.h" -#include - -bool lastfirst(QModelIndexList &list, int &first, int &last) -{ - if (list.isEmpty()) - return false; - first = last = list[0].row(); - for (auto item : list) - { - int row = item.row(); - if (row < first) - first = row; - if (row > last) - last = row; - } - return true; -} - -void showWebsiteForMod(QWidget *parentDlg, Mod &m) -{ - QString url = m.homeurl(); - if (url.size()) - { - // catch the cases where the protocol is missing - if (!url.startsWith("http")) - { - url = "http://" + url; - } - DesktopServices::openUrl(url); - } - else - { - CustomMessageBox::selectable( - parentDlg, QObject::tr("How sad!"), - QObject::tr("The mod author didn't provide a website link for this mod."), - QMessageBox::Warning); - } -} -- cgit v1.2.3