summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 461d45f076..b5e485c57c 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -35,7 +35,7 @@
35#include "utils.h" 35#include "utils.h"
36#include "rbzip.h" 36#include "rbzip.h"
37#include "sysinfo.h" 37#include "sysinfo.h"
38 38#include "detect.h"
39 39
40#if defined(Q_OS_LINUX) 40#if defined(Q_OS_LINUX)
41#include <stdio.h> 41#include <stdio.h>
@@ -266,7 +266,7 @@ void RbUtilQt::updateSettings()
266 updateDevice(); 266 updateDevice();
267 updateManual(); 267 updateManual();
268 if(settings->proxyType() == "system") { 268 if(settings->proxyType() == "system") {
269 HttpGet::setGlobalProxy(systemProxy()); 269 HttpGet::setGlobalProxy(Detect::systemProxy());
270 } 270 }
271 else if(settings->proxyType() == "manual") { 271 else if(settings->proxyType() == "manual") {
272 HttpGet::setGlobalProxy(settings->proxy()); 272 HttpGet::setGlobalProxy(settings->proxy());
@@ -475,23 +475,15 @@ bool RbUtilQt::installAuto()
475 QString myversion = "r" + versmap.value("bleed_rev"); 475 QString myversion = "r" + versmap.value("bleed_rev");
476 476
477 // check installed Version and Target 477 // check installed Version and Target
478 QString rbVersion = installedVersion(settings->mountpoint()); 478 QString rbVersion = Detect::installedVersion(settings->mountpoint());
479 int rbTarget = installedTargetId(settings->mountpoint()); 479
480 if(rbTarget != -1 && rbTarget != settings->curTargetId()) 480 if(Detect::check(settings,false,settings->curTargetId()) == false)
481 { 481 {
482 if(QMessageBox::question(this, tr("Target mismatch detected"), 482 logger->addItem(tr("Aborted!"),LOGERROR);
483 tr("Target mismatch detected. \n\n" 483 logger->abort();
484 "Installed target: %1.\n" 484 return false;
485 "New Target: %2.\n\n"
486 "Do you want to continue?").arg(settings->nameOfTargetId(rbTarget),settings->curName()),
487 QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
488 {
489 logger->addItem(tr("Aborted!"),LOGERROR);
490 logger->abort();
491 return false;
492 }
493 } 485 }
494 486
495 // check version 487 // check version
496 if(rbVersion != "") 488 if(rbVersion != "")
497 { 489 {
@@ -1001,7 +993,7 @@ QUrl RbUtilQt::proxy()
1001 return QUrl(settings->proxy()); 993 return QUrl(settings->proxy());
1002 else if(settings->proxy() == "system") 994 else if(settings->proxy() == "system")
1003 { 995 {
1004 return systemProxy(); 996 return Detect::systemProxy();
1005 } 997 }
1006 return QUrl(""); 998 return QUrl("");
1007} 999}