@ -26,7 +26,7 @@
# include <QProcess>
# include <QProcess>
# include <QRegularExpression>
# include <QRegularExpression>
# include <QStringList>
# include <QStringList>
# include <QStringRef >
# include <QStringView >
# include <QVector>
# include <QVector>
KSolidNotify : : KSolidNotify ( QObject * parent )
KSolidNotify : : KSolidNotify ( QObject * parent )
@ -113,9 +113,9 @@ void KSolidNotify::queryBlockingApps(const QString &devicePath)
connect ( p , static_cast < void ( QProcess : : * ) ( int , QProcess : : ExitStatus ) > ( & QProcess : : finished ) , [ = ] ( int , QProcess : : ExitStatus ) {
connect ( p , static_cast < void ( QProcess : : * ) ( int , QProcess : : ExitStatus ) > ( & QProcess : : finished ) , [ = ] ( int , QProcess : : ExitStatus ) {
QStringList blockApps ;
QStringList blockApps ;
QString out ( p - > readAll ( ) ) ;
QString out ( p - > readAll ( ) ) ;
const QVector < QStringRef > pidList = out . splitRef ( QRegularExpression ( QStringLiteral ( " \\ s+ " ) ) , Qt : : SkipEmptyParts ) ;
const auto pidList = QStringView ( out ) . split ( QRegularExpression ( QStringLiteral ( " \\ s+ " ) ) , Qt : : SkipEmptyParts ) ;
KSysGuard : : Processes procs ;
KSysGuard : : Processes procs ;
for ( const QStringRef & pidStr : pidList ) {
for ( const QStringView & pidStr : pidList ) {
int pid = pidStr . toInt ( ) ;
int pid = pidStr . toInt ( ) ;
if ( ! pid ) {
if ( ! pid ) {
continue ;
continue ;