D28941: startplasma: Sort environment scripts prior to sourcing

David Edmundson noreply at phabricator.kde.org
Sat Apr 18 15:20:21 BST 2020


davidedmundson added a comment.


  Concept makes sense.
  
  QStandardPaths is ordered: "The list of directories is sorted from high to low priority, starting with writableLocation()"
  
  so we can cut this code in half by doing some sort of
  
    void runEnvironmentScripts()
    {
     const auto locations = QStandardPaths::....
     locations.reverse();
     for (const QString &location:locations) {
        runScriptsInDir(location)
      }
    }
    
    void runScriptsInDir(const QString &dir)
    {
            QDir dir(location);
    ...
            std::sort(
    ...
    }
    
    which will keep addition XDG_CONFIG_DIRS in the right order too

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D28941

To: auxym, #plasma, davidedmundson
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200418/b08cd1e9/attachment.html>


More information about the Plasma-devel mailing list