Changeset 356169a3d3 in tspsg for src/mainwindow.cpp


Ignore:
Timestamp:
Jul 11, 2012, 6:46:48 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
ff8d0488a0
Parents:
c90b437dd8
Message:

Updated code to become compilable with Qt 5.

Compiling with Qt 4 is still possible and it will be the main platform
for TSPSG releases until first Qt 5 release is made.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    rc90b437dd8 r356169a3d3  
    13041304QColor hilight;
    13051305    if (color.value() < 192)
    1306         hilight.setHsv(color.hue(), color.saturation(), 127 + qRound(color.value() / 2));
     1306        hilight.setHsv(color.hue(), color.saturation(), 127 + (color.value() / 2));
    13071307    else
    13081308        hilight.setHsv(color.hue(), color.saturation(), color.value() / 2);
     
    13621362        a->setStatusTip(language.at(3));
    13631363#endif
    1364 #if QT_VERSION >= 0x040600
     1364#if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
    13651365        a->setIcon(QIcon::fromTheme(QString("flag-%1").arg(language.at(1)), QIcon(QString(":/images/icons/l10n/flag-%1.png").arg(language.at(1)))));
    13661366#else
     
    16821682#ifndef HANDHELD
    16831683    menuSettingsLanguage->setIcon(GET_ICON("preferences-desktop-locale"));
    1684 #if QT_VERSION >= 0x040600
     1684#if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
    16851685    actionSettingsLanguageEnglish->setIcon(QIcon::fromTheme("flag-gb", QIcon(":/images/icons/l10n/flag-gb.png")));
    1686 #else // QT_VERSION >= 0x040600
     1686#else
    16871687    actionSettingsLanguageEnglish->setIcon(QIcon(":/images/icons/l10n/flag-gb.png"));
    1688 #endif // QT_VERSION >= 0x040600
     1688#endif // QT_VERSION >= QT_VERSION_CHECK(4,6,0)
    16891689    menuSettingsStyle->setIcon(GET_ICON("preferences-desktop-theme"));
    16901690#endif // HANDHELD
     
    16971697    actionHelpReportBug->setIcon(GET_ICON("tools-report-bug"));
    16981698    actionHelpAbout->setIcon(GET_ICON("help-about"));
     1699#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
    16991700    actionHelpAboutQt->setIcon(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"));
    1700 #endif
     1701#else
     1702    actionHelpAboutQt->setIcon(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"));
     1703#endif // QT_VERSION < QT_VERSION_CHECK(5,0,0)
     1704#endif // HANDHELD
    17011705    // Buttons
    17021706    buttonRandom->setIcon(GET_ICON("roll"));
     
    17071711//      action->setIcon(GET_ICON(""));
    17081712
    1709 #if QT_VERSION >= 0x040600
     1713#if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
    17101714    setToolButtonStyle(Qt::ToolButtonFollowStyle);
    17111715#endif
     
    17561760    actionFilePageSetup->setObjectName("actionFilePrintSetup");
    17571761//    actionFilePageSetup->setEnabled(false);
    1758 #if QT_VERSION >= 0x040600
     1762#if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
    17591763    actionFilePageSetup->setIcon(QIcon::fromTheme("document-page-setup", QIcon(":/trolltech/dialogs/qprintpreviewdialog/images/page-setup-32.png")));
    17601764#else
Note: See TracChangeset for help on using the changeset viewer.