Skip to content
  • Tomaz  Canabrava's avatar
    Remove uneeded if-guard · 96d74f6f
    Tomaz Canabrava authored
    Summary:
    The GUIenabled variable is just used if not in KDEVELOP_SINGLE_APP
    mode, but silencing the warning with unguarded-ifs unclutters the
    code a bit and has no sideeffects.
    
    Use brace-initialization for QStringList
    
    No need to test for isEmpty before using Q_FOREACH
    
    If the container is empty, it will just do anything
    on the foreach macro. this also reduces the indentation
    level a bit.
    
    Rename variable p to project
    
    The outer loop has a variable named p, and while C++ accepts
    that inner variables have biggest priority than outer
    variables, this could be a potential human mistake.
    
    Replace 8 ocorrencies of const char* to QString to a single QString
    
    QString is UTF_16 internally, so creating just one QString
    for a given string is better than runtime-creating a few more
    via const char*.
    
    Test Plan: compiled and tested
    
    Reviewers: kfunk, apol
    
    Subscribers: kdevelop-devel
    
    Differential Revision: https://phabricator.kde.org/D4101
    96d74f6f