Changeset 4cc94b19ad in tspsg


Ignore:
Timestamp:
Oct 13, 2012, 10:23:57 PM (12 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
2d4659ddfe
Parents:
b96b44b6b7
git-author:
Oleksii Serdiuk <contacts@…> (10/13/12 22:23:57)
git-committer:
Oleksii Serdiuk <contacts@…> (10/13/12 22:58:57)
Message:

Also add Qt translations when installing on Windows.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • install.pri

    rb96b44b6b7 r4cc94b19ad  
    5050    # This is automatically set by qmake when creating VS Solution file.
    5151    share.sources = $$share.files
    52 #       l10n.sources = $$l10n.files \
    53 #               $$[QT_INSTALL_TRANSLATIONS]/*.qm
     52    l10n.sources = $$l10n.files \
     53        $$[QT_INSTALL_TRANSLATIONS]/qt_ru.qm \
     54        $$[QT_INSTALL_TRANSLATIONS]/qt_uk.qm
    5455    docs.sources = $$docs.files
    5556
    56     DEPLOYMENT += target share docs # l10n
     57    DEPLOYMENT += target share l10n docs
    5758    DEPLOYMENT_PLUGIN += qjpeg qtiff
    5859} else:win32 {
     
    6768        share.files += $$[QT_INSTALL_BINS]/QtSvg$${D}4.dll
    6869    }
    69 #       l10n.files += $$[QT_INSTALL_TRANSLATIONS]/*.qm
     70    l10n.files += $$[QT_INSTALL_TRANSLATIONS]/qt_ru.qm \
     71        $$[QT_INSTALL_TRANSLATIONS]/qt_uk.qm
    7072    win32-g++ {
    7173        share.files += $$[QT_INSTALL_BINS]/mingwm10.dll \
     
    7476    imageformats.files = $$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${D}4.dll \
    7577        $$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${D}4.dll
    76     imageformats.path = $$PREFIX/TSPSG/imageformats
    77     INSTALLS += share imageformats
     78    INSTALLS += share l10n imageformats
    7879
    7980    target.path = $$PREFIX/TSPSG
    8081    share.path = $$PREFIX/TSPSG
    81 #       l10n.path = $$PREFIX/TSPSG/l10n
     82    l10n.path = $$PREFIX/TSPSG/l10n
     83    imageformats.path = $$PREFIX/TSPSG/imageformats
    8284    docs.path = $$PREFIX/TSPSG
    8385}
  • src/mainwindow.cpp

    rb96b44b6b7 r4cc94b19ad  
    15671567    qtTranslator = new QTranslator(this);
    15681568    if (qtTranslator->load("qt_" + lng, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
     1569        // Trying from QT_INSTALL_TRANSLATIONS directory
     1570        qApp->installTranslator(qtTranslator);
     1571    } else if (qtTranslator->load("qt_" + lng, PATH_L10N)) {
     1572        // Than from l10n directory bundled with TSPSG
    15691573        qApp->installTranslator(qtTranslator);
    15701574    } else {
Note: See TracChangeset for help on using the changeset viewer.