From ce8199cdfdef97437ad85178c7104f307baf018b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 11 Oct 2018 18:44:05 +0200 Subject: Cleanup: remove ReverseGeoLookupThread Fetching the taxonomy from GPS coordinates was implemented in a QThread. But the only access to the main function was a direct call to run(). Thus, the thread was *never* started. The function call was always asynchronous [it was using an event loop though, so the UI doesn't hang]. Notably this means that the signals connected to the thread would never fire. And the spinner would never be activated. Thus: 1) Turn the thread into a simple function. 2) Remove the spinner. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/maintab.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'desktop-widgets/tab-widgets/maintab.cpp') diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index d45bc246d..053f4e043 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -195,21 +195,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui.cylinders->view()->horizontalHeader()->addAction(action); } - ui.waitingSpinner->setRoundness(70.0); - ui.waitingSpinner->setMinimumTrailOpacity(15.0); - ui.waitingSpinner->setTrailFadePercentage(70.0); - ui.waitingSpinner->setNumberOfLines(8); - ui.waitingSpinner->setLineLength(5); - ui.waitingSpinner->setLineWidth(3); - ui.waitingSpinner->setInnerRadius(5); - ui.waitingSpinner->setRevolutionsPerSecond(1); - - connect(ReverseGeoLookupThread::instance(), SIGNAL(finished()), - LocationInformationModel::instance(), SLOT(update())); - - connect(ReverseGeoLookupThread::instance(), &QThread::finished, - this, &MainTab::setCurrentLocationIndex); - connect(ui.diveNotesMessage, &KMessageWidget::showAnimationFinished, ui.location, &DiveLocationLineEdit::fixPopupPosition); @@ -245,16 +230,6 @@ void MainTab::setCurrentLocationIndex() } } -void MainTab::enableGeoLookupEdition() -{ - ui.waitingSpinner->stop(); -} - -void MainTab::disableGeoLookupEdition() -{ - ui.waitingSpinner->start(); -} - void MainTab::toggleTriggeredColumn() { QAction *action = qobject_cast(sender()); -- cgit v1.2.3-70-g09d2