mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-15 04:15:36 -05:00
use static (And const where applicable) regular expression objects
the speed increase here is noticable since the work of creating a regex object is only done once per session
This commit is contained in:
@@ -31,7 +31,7 @@ PreferenceEditor::~PreferenceEditor()
|
||||
|
||||
void PreferenceEditor::populateFields() {
|
||||
QStringList themes = { "default" };
|
||||
QRegularExpression re(":/themes/([A-z0-9_-]+).qss");
|
||||
static const QRegularExpression re(":/themes/([A-z0-9_-]+).qss");
|
||||
QDirIterator it(":/themes", QDirIterator::Subdirectories);
|
||||
while (it.hasNext()) {
|
||||
QString themeName = re.match(it.next()).captured(1);
|
||||
|
||||
Reference in New Issue
Block a user