Changeset 5f8c8ea92c in tspsg


Ignore:
Timestamp:
Sep 13, 2012, 1:37:51 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
87b8a22768
Parents:
6652ac66a4
git-author:
Oleksii Serdiuk <contacts@…> (09/13/12 13:37:51)
git-committer:
Oleksii Serdiuk <contacts@…> (09/13/12 13:46:43)
Message:

More reliable detection of current application style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    r6652ac66a4 r5f8c8ea92c  
    15201520        a->setCheckable(true);
    15211521        a->setActionGroup(groupSettingsStyleList);
    1522         if ((style == settings->value("Stlye").toString())
     1522        QRegExp rx(QString("^Q?%1(::(Style)?)?$").arg(QRegExp::escape(style)), Qt::CaseInsensitive);
     1523        if ((style == settings->value("Style").toString()) || QApplication::style()->objectName().contains(rx)
    15231524#ifndef Q_WS_MAEMO_5
    1524             || QString(QApplication::style()->metaObject()->className()).contains(QRegExp(QString("^Q?%1(Style)?$").arg(QRegExp::escape(style)), Qt::CaseInsensitive))
     1525            || QString(QApplication::style()->metaObject()->className()).contains(rx)
    15251526#endif
    15261527        ) {
Note: See TracChangeset for help on using the changeset viewer.