Commit 3e840139 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Add comments about QSet deprecated methods

parent 09df31fe
......@@ -559,6 +559,7 @@ bool MainWindow::queryClose()
// Check what processes are running, excluding the shell
QStringList processesRunning;
// Once Qt5.14+ is the mininum, change to use range constructors
const auto uniqueSessions = QSet<Session*>::fromList(_viewManager->sessions());
for (Session *session : uniqueSessions) {
......
......@@ -131,6 +131,7 @@ QSet<QString> ProcessInfo::commonDirNames()
if (forTheFirstTime) {
const KSharedConfigPtr &config = KSharedConfig::openConfig();
const KConfigGroup &configGroup = config->group("ProcessInfo");
// Once Qt5.14+ is the mininum, change to use range constructors
_commonDirNames = QSet<QString>::fromList(configGroup.readEntry("CommonDirNames", QStringList()));
forTheFirstTime = false;
......
......@@ -309,6 +309,7 @@ void ProfileManager::saveSettings()
QList<Profile::Ptr> ProfileManager::sortedFavorites()
{
// Once Qt5.14+ is the mininum, change to use range constructors
QList<Profile::Ptr> favorites = findFavorites().toList();
sortProfiles(favorites);
......@@ -319,11 +320,13 @@ QList<Profile::Ptr> ProfileManager::allProfiles()
{
loadAllProfiles();
// Once Qt5.14+ is the mininum, change to use range constructors
return _profiles.toList();
}
QList<Profile::Ptr> ProfileManager::loadedProfiles() const
{
// Once Qt5.14+ is the mininum, change to use range constructors
return _profiles.toList();
}
......@@ -641,6 +644,7 @@ void ProfileManager::loadFavorites()
if (favoriteGroup.hasKey("Favorites")) {
QStringList list = favoriteGroup.readEntry("Favorites", QStringList());
// Once Qt5.14+ is the mininum, change to use range constructors
favoriteSet = QSet<QString>::fromList(list);
}
......
......@@ -1069,6 +1069,7 @@ void SessionController::copyInputToAllTabs()
// Find our window ...
const KXmlGuiWindow* myWindow = findWindow(_view);
// Once Qt5.14+ is the mininum, change to use range constructors
QSet<Session*> group =
QSet<Session*>::fromList(SessionManager::instance()->sessions());
for (auto session : group) {
......@@ -1099,6 +1100,7 @@ void SessionController::copyInputToSelectedTabs()
QPointer<CopyInputDialog> dialog = new CopyInputDialog(_view);
dialog->setMasterSession(_session);
// Once Qt5.14+ is the mininum, change to use range constructors
QSet<Session*> currentGroup = QSet<Session*>::fromList(_copyToGroup->sessions());
currentGroup.remove(_session);
......@@ -1135,6 +1137,7 @@ void SessionController::copyInputToNone()
return;
}
// Once Qt5.14+ is the mininum, change to use range constructors
QSet<Session*> group =
QSet<Session*>::fromList(SessionManager::instance()->sessions());
for (auto iterator : group) {
......
......@@ -88,6 +88,7 @@ ViewSplitter *ViewSplitter::activeSplitter()
void ViewSplitter::updateSizes()
{
const int space = (orientation() == Qt::Horizontal ? width() : height()) / count();
// Once Qt5.14+ is the mininum, change to use range constructors
setSizes(QVector<int>(count(), space).toList());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment