--- a/src/aboutdialog/OcsPersonItem.cpp
+++ b/src/aboutdialog/OcsPersonItem.cpp
@@ -23,6 +23,7 @@
 #include <QStandardPaths>
 #include <Attica/Provider>
 #include <Attica/ItemJob>
+#include <KIO/OpenUrlJob>
 #include <KIO/StoredTransferJob>
 
 #include <QHBoxLayout>
@@ -124,7 +125,9 @@ void
 OcsPersonItem::launchUrl( QAction *action ) //SLOT
 {
     QUrl url = QUrl( action->data().toString() );
-    KRun::runUrl( url, QStringLiteral("text/html"), nullptr, KRun::RunExecutables, QString() );
+    KIO::OpenUrlJob *openUrlJob = new KIO::OpenUrlJob(url, QStringLiteral("text/html"), this );
+    openUrlJob->setRunExecutables( true );
+    openUrlJob->start();
 }
 
 void
--- a/src/core-impl/podcasts/sql/SqlPodcastProvider.cpp
+++ b/src/core-impl/podcasts/sql/SqlPodcastProvider.cpp
@@ -1370,7 +1370,7 @@ SqlPodcastProvider::downloadResult( KJob
 
         layoutmap.insert( QStringLiteral("pubdate"), sqlEpisode->pubDate().toString() );
 
-        sequenceNumber.sprintf( "%.6d", sqlEpisode->sequenceNumber() );
+        sequenceNumber.asprintf( "%.6d", sqlEpisode->sequenceNumber() );
         layoutmap.insert( QStringLiteral("number"), sequenceNumber );
 
         if( sqlEpisode->album() )
--- a/src/databaseimporter/SqlBatchImporterConfig.cpp
+++ b/src/databaseimporter/SqlBatchImporterConfig.cpp
@@ -27,6 +27,7 @@ 
 #include <QLabel>
 #include <QLineEdit>
 #include <QVBoxLayout>
+#include <QFileSystemModel>
 
 SqlBatchImporterConfig::SqlBatchImporterConfig( QWidget *parent )
     : BoxWidget( true, parent )
@@ -45,7 +45,7 @@ SqlBatchImporterConfig::SqlBatchImporter
     QLabel *label = new QLabel( i18n( "Input file" ), gridHolder );
     m_inputFilePathInput = new QLineEdit( gridHolder );
     QCompleter *completer = new QCompleter( this );
-    completer->setModel( new QDirModel( completer ) );
+    completer->setModel( new QFileSystemModel( completer ) );
     m_inputFilePathInput->setCompleter( completer );
     m_inputFilePathInput->setText( QDir::homePath() + "/result.xml" );
     label->setBuddy( m_inputFilePathInput );
--- a/src/playlist/PlaylistDock.cpp
+++ b/src/playlist/PlaylistDock.cpp
@@ -44,6 +44,7 @@
 #include "widgets/BoxWidget.h"
 
 #include <QLabel>
+#include <QSharedPointer>
 #include <QStandardPaths>
 #include <QToolBar>
 
@@ -300,12 +301,15 @@ Playlist::Dock::slotSaveCurrentPlaylist(
     if( action == 0 )
         return;
 
-    QWeakPointer<Playlists::UserPlaylistProvider> pointer =
+    QWeakPointer<Playlists::UserPlaylistProvider> weakPointer =
             action->data().value< QWeakPointer<Playlists::UserPlaylistProvider> >();
-    Playlists::UserPlaylistProvider* provider = pointer.data();
-
-    const Meta::TrackList tracks = The::playlist()->tracks();
-    The::playlistManager()->save( tracks, Amarok::generatePlaylistName( tracks ), provider );
+    QSharedPointer<Playlists::UserPlaylistProvider> strongPointer = weakPointer.toStrongRef();
+    if ( strongPointer ) {
+        Playlists::UserPlaylistProvider* provider = strongPointer.data();
+
+        const Meta::TrackList tracks = The::playlist()->tracks();
+        The::playlistManager()->save( tracks, Amarok::generatePlaylistName( tracks ), provider );
+    }
 }
 
 void
--- a/src/playlist/ProgressiveSearchWidget.cpp
+++ b/src/playlist/ProgressiveSearchWidget.cpp
@@ -208,7 +208,7 @@ void ProgressiveSearchWidget::noMatch()
     const KStatefulBrush backgroundBrush( KColorScheme::View, KColorScheme::NegativeBackground );
 
     QPalette p = m_searchEdit->palette();
-    p.setColor( QPalette::Base, backgroundBrush.brush( m_searchEdit ).color() );
+    p.setColor( QPalette::Base, backgroundBrush.brush( p ).color() );
     m_searchEdit->setPalette( p );
 }
 
--- a/src/scanner/GenericScanManager.cpp
+++ b/src/scanner/GenericScanManager.cpp
@@ -131,18 +131,21 @@ GenericScanManager::abort()
 void
 GenericScanManager::connectSignalsToJob()
 {
-    auto scannerJob = m_scannerJob.data();
-    // we used to have direct connections here, but that caused too much work being done
-    // in the non-main thread, even in code that wasn't thread-safe, which lead to
-    // crashes (bug 319835) and other potential data races
-    connect( scannerJob, QOverload<ScanType>::of(&GenericScannerJob::started),
-             this, &GenericScanManager::started );
-    connect( scannerJob, &GenericScannerJob::directoryCount,
-             this, &GenericScanManager::directoryCount);
-    connect( scannerJob, &GenericScannerJob::directoryScanned,
-             this, &GenericScanManager::directoryScanned );
-    connect( scannerJob, &GenericScannerJob::succeeded,
-             this, &GenericScanManager::succeeded );
-    connect( scannerJob, QOverload<QString>::of(&GenericScannerJob::failed),
-             this, &GenericScanManager::failed );
+    auto scannerJobPointer = m_scannerJob.toStrongRef();
+    if( scannerJobPointer ) {
+        auto scannerJob = scannerJobPointer.data();
+        // we used to have direct connections here, but that caused too much work being done
+        // in the non-main thread, even in code that wasn't thread-safe, which lead to
+        // crashes (bug 319835) and other potential data races
+        connect( scannerJob, QOverload<ScanType>::of(&GenericScannerJob::started),
+                 this, &GenericScanManager::started );
+        connect( scannerJob, &GenericScannerJob::directoryCount,
+                 this, &GenericScanManager::directoryCount);
+        connect( scannerJob, &GenericScannerJob::directoryScanned,
+                 this, &GenericScanManager::directoryScanned );
+        connect( scannerJob, &GenericScannerJob::succeeded,
+                 this, &GenericScanManager::succeeded );
+        connect( scannerJob, QOverload<QString>::of(&GenericScannerJob::failed),
+                 this, &GenericScanManager::failed );
+    }
 }
