path: root/rbutil/rbutilqt/base/utils.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-11-14rbutil: Rework player configuration.Dominik Riebeling1-3/+3
Rename config entries and remove now unnecessary default value handling. Change-Id: I5c60ef9769fc01f45f45290dafffb80c1962e674
2020-11-14rbutil: Rework player configuration.Dominik Riebeling1-3/+3
- Split internal configuration into player specific and common parts. Always require passing the player for player specific data instead of implicitly assuming the currently selected one; only use the currently selected one if the player name is explicitly passed as empty. - Similarly adjust handling of server info data; prepare for splitting into build type specific values so the naming becomes cleaner. Change-Id: I894e694f83bd9fe2d22ad46b3f8f7df3e2c68033
2020-10-04rbutil: Replace sysinfo filesystem cluster size with type.Dominik Riebeling1-10/+47
The cluster size isn't too useful. Show the filesystem type instead, since that makes it easier to identify a device not showing up because of its filesystem type. Change-Id: I8f58ea23ab90808ab0c37978b211a5470ed8bb8e
2020-09-30rbutil: Fix unnecessary implicit cast.Dominik Riebeling1-2/+2
Change-Id: Id05220a700eb826d38023575b02f568b1c1a7580
2020-09-27rbutil: Fix some minor issues found by clazy.Dominik Riebeling1-2/+1
Change-Id: I0e63df09caf959dcb325c6ad2297c4348388a831
2020-08-16rbutil: QString::split() changed with Qt 5.14.Dominik Riebeling1-0/+16
Avoid a deprecated warning, and make it compile with Qt6, which removes the old version. Change-Id: Iaad10660a0c8bda9d7aa52ee250489ed135bd8a8
2020-08-16rbutil: Fix various warnings.Dominik Riebeling1-1/+1
Replace use of deprecated APIs with their replacements, and fix some other minor warnings. Change-Id: I3f63e0bd91b96ce86ce39c087fe0040fc226d16d
2020-07-26rbutil: Remove unnecessary (and implicit) type conversion.Dominik Riebeling1-1/+1
2019-10-28rbutil: add function to suspend/resume processesCástor Muñoz1-0/+122
Change-Id: I99cfaaa4f853930cea88184496e91589b42859f3
2016-01-17Return process IDs in Utils::findRunningProcess().Dominik Riebeling1-21/+33
Rework to return mapping between (filtered) process names and their pid values (if running). Note that this functionality is not implemented for Linux (but as it's mostly intended to detect Itunes currently not needed on that platform). Change-Id: Ie348bfed46bda390f469c37635a96c75e5782616
2016-01-17rbutil: fix resolveDevicename() on WindowsCástor Muñoz1-5/+6
Solves some eject issues (FSCTL_LOCK_VOLUMEN ioctl failures) ocurring when resolveDevicename() is ejecuted prior to ejectDevice(), tested with Qt5. Change-Id: Iff9240abd9d2f71bec1a1070f4ef194916e13b65
2015-05-02Improve update check information dialog.Dominik Riebeling1-0/+14
Show the user both the current and updated version. Change-Id: Ief693cce020a39a0c79bf2705da4a44b7bd15928
2014-03-20OS X: use FSGetVolumeParms when targeting 10.5+.Dominik Riebeling1-4/+20
PBHGetVolParmsSync() is not available when building with 64bit. The replacement FSGetVolumeParms() is available on 10.5+ only. Use the latter when building with target version 10.5+. This requires builds targeting 10.4 to 32bit and allows building as 64bit when targeting 10.5+. Change-Id: Ic53217f3090147bea473613335f9482623a470bd
2013-11-04Use cutelogger for Rockbox Utility internal trace.Dominik Riebeling1-32/+33
Change tracing from qDebug() to use cutelogger, which is available under the LGPL2.1. This allows to automatically add filename and line number to the log, and also provides multiple log levels. Change-Id: I5dbdaf902ba54ea99f07ae10a07467c52fdac910
2013-09-18Add "FAT" as supported filesystem on Windows.Dominik Riebeling1-1/+1
In some cases Windows reports the string "FAT" (without any type number). Accept that as well. Change-Id: Ia278ccc574913106cb5ca6751af70125f769c59c
2013-06-09Only show mountpoints containing a supported filesystem in dropdown.Dominik Riebeling1-3/+3
Change configuration to use filtered mountpoints list. Add HFS+ to the list of supported filesystems -- while Rockbox doesn't run on HFS+ MacPods will use that format, and not having them in the list will then make OS X users wonder why their Ipod isn't showing up. This might need to get revised later. Change-Id: I5eeeb05be6780cb3952a0081df0ce782eca01589
2013-04-04Extend Utils::mountpoints() to allow filtering for supported types.Dominik Riebeling1-10/+42
Instead of trying every mountpoint during autodetection allow filtering out filesystems that are not supported when retrieving the system mountpoints. Change-Id: Ic23a5c804cb7c78c146dbc1af7443c67ce12464e
2013-01-27Replace toAscii() / fromAscii() with Latin1() functions.Dominik Riebeling1-2/+2
Qt5 deprecates the Ascii conversion functions, and the Latin1 functions pretty much do the same. Change-Id: I5dee6a443fcfee6afd3256ee536698bcf65ff896
2012-10-06Fix a couple of warnings and remove an unused variable.Dominik Riebeling1-0/+3
Change-Id: I1617ef882e9bcaaaafe58a932fadd803851ec88f
2012-09-16Support "eject" on OS X.Dominik Riebeling1-0/+39
Change-Id: I103587f2fad2b8b31a1bc53afbd107bf55f62c93
2012-09-08Add "Eject" button to main window.Dominik Riebeling1-0/+60
Since especially Windows puts the eject functionality behind an icon in the systray which is usually hidden and doesn't complain if a USB drive is unplugged without ejecting it first ejecting such a device might not be obvious to everyone. Add a button to the main window allowing to eject the selected player. Currently only implemented for Windows. Change-Id: I785ac1482cda03a1379cf6d0fd0d9a0ff8130092
2012-08-19Check environment before starting installation.Dominik Riebeling1-0/+1
The environment needs to be correct for other installations than main Rockbox as well. Change-Id: Icf626de63b58ba40f600fd095a254b6e7e9e46ee
2012-05-11Don't try to resolve an empty path.Dominik Riebeling1-3/+4
An empty path is not resolvable, so immediately return an empty result. Fixes an empty path resolve to "/" on Linux / OS X. Change-Id: I22c26a7716becbf46850a04e18ee581084546263
2012-02-21Implement findProcess() on OS X.Dominik Riebeling1-1/+28
Change-Id: Iec5e91f1c8c08a58a19f79339d03247148347d45
2012-01-29findExecutable(): cleanup log output a bit.Dominik Riebeling1-2/+3
Change-Id: I217bddc91ff9ea43a5cfc018818f5a19b1555dd9
2012-01-22Check running processes at startup.Dominik Riebeling1-0/+56
Retrieve the processes running at startup and compare with a list of potentially problematic ones. Right now this is Itunes which is known to be able to cause problems when trying to install the bootloader on an Ipod. No user notification yet. This adds the implementation for Windows. Change-Id: I5ce8a85da52e0ed8f523b5ae6fb5d8f14f6a14c9
2011-11-01Show user friendly name on target mismatch.Dominik Riebeling1-4/+4
Instead of showing the target name as stored in rockbox-info.txt retrieve the full descriptive name. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-10-19Remove svn keyword lines from sources.Dominik Riebeling1-1/+0
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-26Take cluster size into account when calculating zip extracted size.Dominik Riebeling1-3/+28
Allow passing an (optional) cluster size to round up all file sizes when calculating the total size of an extracted zip archive. This allows to check if the space on disk is actually sufficient without relying on an arbitrary headroom value which might be wrong. Addresses FS#12195. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-17Implement reading the volume label on OS X.Dominik Riebeling1-1/+42
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-17Move some helper functions out of Autodetection.Dominik Riebeling1-4/+218
Those functions are rather general, so put them into the Utils class instead. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-17The mountpoint is stored with normalized separators.Dominik Riebeling1-1/+1
Make sure to convert it on reading to avoid not finding it even if stored with native separators in the configuration. Fix a warning on Windows. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-15Show volume labels on Windows.Dominik Riebeling1-1/+18
In mountpoint selection and system info dialog show the volume name to make it easier to identify a specific device. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2011-07-15Show the total size of the volume along with the free space.Dominik Riebeling1-5/+31
This should help identifying the correct player by size, since the free space is only useful to figure if there is enough space to install Rockbox. Change units to GiB since that is more useful given the size of current devices. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-06-30FS#11439: Fix version comparison regression.Dominik Riebeling1-2/+14
Improve string suffix handling by distinguishing between version number separators (i.e. dots) and extended separators and additional version characters. Corrects false update information displayed for 64bit binaries of Rockbox Utility. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-06-18Log filesystem free value to system trace.Dominik Riebeling1-0/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-06-18Make System and Utils class based on QObject.Dominik Riebeling1-3/+3
Those classes use Qt objects anyway, and making them based on QObject moved the strings into the appropriate class when translating. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-06-11Rework Rockbox Utility update version number check.Dominik Riebeling1-0/+67
The version check failed on subrelease versions (as the 1.2.5-1 rebuild done for Mac) and detected an updated version that is in fact an outdated one. Rework the comparison completely, move it to the Utils class and display some more information in the status bar upon update check. Especially keep a notice in the status bar if an updated version was found. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-04-02Move utils.cpp functions into separate class and split it up.Dominik Riebeling1-52/+11
Move class-less functions in utils.cpp into a new Utils class and make the old functions static. This prevents clashes with system C functions. Rename some functions to avoid macro problems (check() is a macro on OS X). Split out the RockboxInfo class into a separate file. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-02-20Update an outdated comment.Dominik Riebeling1-3/+2
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2010-01-24rbutil: split RbSettings. use Stable/unstable status from server.Dominik Wenger1-2/+3
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-11-21Use f_frsize when calculating the free disk space from the block count. ↵Dominik Riebeling1-1/+1
Fixes wrong value on implementations with f_bsize != f_frsize. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-10-29Improve a few debug logger messages.Dominik Riebeling1-3/+3
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-09-25Add special handling for ipodvideo64mb when detecting the player via ↵Dominik Riebeling1-1/+5
rockbox-info.txt. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-08-11Fix Rockbox Utility build on W32.Dominik Riebeling1-1/+1
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-08-10Clean up and rename Detect class.Dominik Riebeling1-0/+43
Move check() function out of the Detect class and place it into utils.cpp for now. Rename Detect class to System, as it now only retrieves data about the underlying system and doesn't detect anything anymore. Cleans up with the confusion between Detect and Autodetection. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-08-10Simplify and cleanup rockbox-info.txt handling.Dominik Riebeling1-10/+9
Simplify RockboxInfo file handling. Remove Detect::installedVersion() and Detect::installedTarget(), as those became wrappers around RockboxInfo without functionality. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-04-29rbutil: completely rework how tts and encoders are configured. (FS#10070)Dominik Wenger1-0/+29
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-04-16Fix overflow on free space calculation (Linux / OS X).Dominik Riebeling1-3/+3
git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
2009-03-21rbutil: create a RockboxInfo class so all rockbox-info.txt handling is in ↵Dominik Wenger1-0/+40
one place. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657