+void TabWidget::updateDownloadDirectory(QString newDownloadDirectory) const
+{
+ // Remove the file name from the save file path.
+ newDownloadDirectory.truncate(newDownloadDirectory.lastIndexOf(QLatin1Char('/')));
+
+ // Update the download location.
+ Settings::setDownloadDirectory(newDownloadDirectory);
+
+ // Get a handle for the KConfig skeleton.
+ KConfigSkeleton *kConfigSkeletonPointer = Settings::self();
+
+ // Write the settings to disk.
+ kConfigSkeletonPointer->save();
+}
+