MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / getThemeNames

Method getThemeNames

global.cpp:996–1015  ·  view source on GitHub ↗

Get all available themes

Source from the content-addressed store, hash-verified

994
995// Get all available themes
996QStringList Global::getThemeNames() {
997 QStringList values;
998 values.empty();
999#ifndef _WIN32
1000 QFile systemTheme(fileManager.getProgramDirPath("theme.ini"));
1001#else
1002 QFile systemTheme(fileManager.getProgramDirPath("theme.ini").replace("\\","/"));
1003#endif
1004 this->getThemeNamesFromFile(systemTheme, values);
1005#ifndef _WIN32
1006 QFile userTheme(fileManager.getHomeDirPath("theme.ini"));
1007#else
1008 QFile userTheme(fileManager.getHomeDirPath("theme.ini").replace("\\","/"));
1009#endif
1010 this->getThemeNamesFromFile(userTheme, values);
1011 if (!nonAsciiSortBug)
1012 qSort(values.begin(), values.end(), caseInsensitiveLessThan);
1013
1014 return values;
1015}
1016
1017
1018

Callers 2

setupThemeMenuMethod · 0.80
AppearancePreferencesMethod · 0.80

Calls 3

getThemeNamesFromFileMethod · 0.95
getHomeDirPathMethod · 0.80
getProgramDirPathMethod · 0.45

Tested by

no test coverage detected