summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/detect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/detect.cpp')
-rw-r--r--rbutil/rbutilqt/base/detect.cpp33
1 files changed, 2 insertions, 31 deletions
diff --git a/rbutil/rbutilqt/base/detect.cpp b/rbutil/rbutilqt/base/detect.cpp
index 9eaa1c9bb7..3b8547bdaf 100644
--- a/rbutil/rbutilqt/base/detect.cpp
+++ b/rbutil/rbutilqt/base/detect.cpp
@@ -396,36 +396,6 @@ QUrl Detect::systemProxy(void)
396} 396}
397 397
398 398
399/** @brief detects the installed Rockbox version
400 * @return QString with version. Empty if not aviable
401 */
402QString Detect::installedVersion(QString mountpoint)
403{
404 RockboxInfo info(mountpoint);
405 if(!info.open())
406 {
407 return "";
408 }
409
410 return info.version();
411}
412
413
414/** @brief detects installed rockbox target string
415 * @return target name (platform) of installed Rockbox, empty string on error.
416 */
417QString Detect::installedTarget(QString mountpoint)
418{
419 RockboxInfo info(mountpoint);
420 if(!info.open())
421 {
422 return "";
423 }
424
425 return info.target();
426}
427
428
429/** @brief checks different Enviroment things. Ask if user wants to continue. 399/** @brief checks different Enviroment things. Ask if user wants to continue.
430 * @param settings A pointer to rbutils settings class 400 * @param settings A pointer to rbutils settings class
431 * @param permission if it should check for permission 401 * @param permission if it should check for permission
@@ -449,7 +419,8 @@ QString Detect::check(bool permission)
449 } 419 }
450 420
451 // Check TargetId 421 // Check TargetId
452 QString installed = installedTarget(RbSettings::value(RbSettings::Mountpoint).toString()); 422 RockboxInfo rbinfo(RbSettings::value(RbSettings::Mountpoint).toString());
423 QString installed = rbinfo.target();
453 if(!installed.isEmpty() && installed != RbSettings::value(RbSettings::CurConfigureModel).toString()) 424 if(!installed.isEmpty() && installed != RbSettings::value(RbSettings::CurConfigureModel).toString())
454 { 425 {
455 text += QObject::tr("<li>Target mismatch detected.\n" 426 text += QObject::tr("<li>Target mismatch detected.\n"