mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-14 07:32:35 -05:00
Improve update check information dialog.
Show the user both the current and updated version. Change-Id: Ief693cce020a39a0c79bf2705da4a44b7bd15928
This commit is contained in:
parent
43b1ccffcc
commit
72b81c2559
5 changed files with 60 additions and 15 deletions
|
|
@ -342,6 +342,20 @@ QString Utils::checkEnvironment(bool permission)
|
|||
else
|
||||
return text;
|
||||
}
|
||||
|
||||
/** @brief Trim version string from filename to version part only.
|
||||
* @param s Version string
|
||||
* @return Version part of string if found, input string on error.
|
||||
*/
|
||||
QString Utils::trimVersionString(QString s)
|
||||
{
|
||||
QRegExp r = QRegExp(".*([\\d\\.]+\\d+[a-z]?).*");
|
||||
if(r.indexIn(s) != -1) {
|
||||
return r.cap(1);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/** @brief Compare two version strings.
|
||||
* @param s1 first version string
|
||||
* @param s2 second version string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue