diff options
| author | Nate Graham <nate@kde.org> | 2020-09-03 11:27:49 -0600 | 
|---|---|---|
| committer | Nate Graham <nate@kde.org> | 2020-09-03 12:28:15 -0600 | 
| commit | a1ffd1418f355ae927c9b7859cffcb6caa767306 (patch) | |
| tree | 9da207fe22dc05b702f744d7ccf7065045bed2d5 /src | |
| parent | 89c99164b4c235dfc61aa3cdd6997dc1413281ce (diff) | |
| download | kconfig-a1ffd1418f355ae927c9b7859cffcb6caa767306.tar.gz kconfig-a1ffd1418f355ae927c9b7859cffcb6caa767306.tar.bz2 | |
Make KWindowConfig::allConnectedScreens() static and internal
It doesn't need to be public since it's just an internal convenience
function. So let's make it static.
BUG: 425953
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui/kwindowconfig.cpp | 23 | ||||
| -rw-r--r-- | src/gui/kwindowconfig.h | 7 | 
2 files changed, 12 insertions, 18 deletions
| diff --git a/src/gui/kwindowconfig.cpp b/src/gui/kwindowconfig.cpp index 5785bdbc..bb541b8e 100644 --- a/src/gui/kwindowconfig.cpp +++ b/src/gui/kwindowconfig.cpp @@ -14,6 +14,18 @@  static const char s_initialSizePropertyName[] = "_kconfig_initial_size";  static const char s_initialScreenSizePropertyName[] = "_kconfig_initial_screen_size"; +// Convenience function to get a space-separated list of all connected screens +static QString allConnectedScreens() +{ +    QStringList names; +    const auto screens = QGuiApplication::screens(); +    names.reserve(screens.length()); +    for (auto screen : screens) { +        names << screen->name(); +    } +    return names.join(QLatin1Char(' ')); +} +  void KWindowConfig::saveWindowSize(const QWindow *window, KConfigGroup &config, KConfigGroup::WriteConfigFlags options)  {      // QWindow::screen() shouldn't return null, but it sometimes does due to bugs. @@ -127,14 +139,3 @@ void KWindowConfig::restoreWindowPosition(QWindow *window, const KConfigGroup &c      window->setX(xPos);      window->setY(yPos);  } - -QString KWindowConfig::allConnectedScreens() -{ -    QStringList names; -    const auto screens = QGuiApplication::screens(); -    names.reserve(screens.length()); -    for (auto screen : screens) { -        names << screen->name(); -    } -    return names.join(QStringLiteral(" ")); -} diff --git a/src/gui/kwindowconfig.h b/src/gui/kwindowconfig.h index 3fda43c1..4bb56e12 100644 --- a/src/gui/kwindowconfig.h +++ b/src/gui/kwindowconfig.h @@ -82,12 +82,5 @@ KCONFIGGUI_EXPORT void saveWindowPosition(const QWindow *window, KConfigGroup &c   * @since 5.74   */  KCONFIGGUI_EXPORT void restoreWindowPosition(QWindow *window,  const KConfigGroup &config); - -/** - * Convenience function to get a space-separated list of all connected screens. - * - * @since 5.74 - */ -QString allConnectedScreens();  }  #endif // KWINDOWCONFIG_H | 
