Skip to content

Commit

Permalink
Drop qAsConst
Browse files Browse the repository at this point in the history
Prefer C++17 std::as_const().
The one that got away!
  • Loading branch information
luis-pereira committed May 3, 2024
1 parent 78ace6d commit 29e9b18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/

#include <utility>

#include <QDockWidget>
#include <QScreen>
#include <QToolButton>
Expand Down Expand Up @@ -537,7 +539,7 @@ void MainWindow::setupCustomDirs()

dirs.removeDuplicates(); // QStandardPaths::locateAll() produces duplicates

for (const QString& dir : qAsConst(dirs)) {
for (const QString& dir : std::as_const(dirs)) {
TermWidgetImpl::addCustomColorSchemeDir(dir + QLatin1String("/color-schemes"));
}
// FIXME: To be deprecated and then removed
Expand Down

0 comments on commit 29e9b18

Please sign in to comment.