Subversion Repositories tpanel

Rev

Rev 323 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 323 Rev 326
Line 99... Line 99...
99
#ifdef Q_OS_IOS
99
#ifdef Q_OS_IOS
100
#include "ios/QASettings.h"
100
#include "ios/QASettings.h"
101
#include "ios/tiosrotate.h"
101
#include "ios/tiosrotate.h"
102
#include "ios/tiosbattery.h"
102
#include "ios/tiosbattery.h"
103
#endif
103
#endif
-
 
104
#if TESTMODE == 1
-
 
105
#include "testmode.h"
-
 
106
#endif
104
 
107
 
105
#if __cplusplus < 201402L
108
#if __cplusplus < 201402L
106
#   error "This module requires at least C++14 standard!"
109
#   error "This module requires at least C++14 standard!"
107
#else
110
#else
108
#   if __cplusplus < 201703L
111
#   if __cplusplus < 201703L
Line 2696... Line 2699...
2696
                                  QASettings::getOldSurface(),
2699
                                  QASettings::getOldSurface(),
2697
                                  QASettings::getOldToolbarSuppress(),
2700
                                  QASettings::getOldToolbarSuppress(),
2698
                                  QASettings::getOldToolbarForce());
2701
                                  QASettings::getOldToolbarForce());
2699
            }
2702
            }
2700
#endif
2703
#endif
-
 
2704
#if TESTMODE == 1
-
 
2705
            {
-
 
2706
                if (_gTestMode)
-
 
2707
                    _gTestMode->run();
-
 
2708
            }
-
 
2709
#endif
2701
        break;
2710
        break;
2702
#if not defined(Q_OS_IOS) && not defined(Q_OS_ANDROID)
2711
#if not defined(Q_OS_IOS) && not defined(Q_OS_ANDROID)
2703
        default:
2712
        default:
2704
            mHasFocus = true;
2713
            mHasFocus = true;
2705
#endif
2714
#endif
Line 5222... Line 5231...
5222
    DECL_TRACER("MainWindow::playSound(const string& file)");
5231
    DECL_TRACER("MainWindow::playSound(const string& file)");
5223
 
5232
 
5224
    MSG_DEBUG("Playing file " << file);
5233
    MSG_DEBUG("Playing file " << file);
5225
 
5234
 
5226
    if (TConfig::getMuteState())
5235
    if (TConfig::getMuteState())
-
 
5236
    {
-
 
5237
#if TESTMODE == 1
-
 
5238
        __success = true;
-
 
5239
        __done = true;
-
 
5240
#endif
5227
        return;
5241
        return;
-
 
5242
    }
5228
 
5243
 
5229
    if (!mMediaPlayer)
5244
    if (!mMediaPlayer)
5230
    {
5245
    {
5231
        mMediaPlayer = new QMediaPlayer;
5246
        mMediaPlayer = new QMediaPlayer;
5232
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
5247
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Line 5240... Line 5255...
5240
#else
5255
#else
5241
    mMediaPlayer->setSource(QUrl::fromLocalFile(file.c_str()));
5256
    mMediaPlayer->setSource(QUrl::fromLocalFile(file.c_str()));
5242
    mAudioOutput->setVolume(TConfig::getSystemVolume());
5257
    mAudioOutput->setVolume(TConfig::getSystemVolume());
5243
#endif
5258
#endif
5244
    mMediaPlayer->play();
5259
    mMediaPlayer->play();
-
 
5260
#if TESTMODE == 1
-
 
5261
    __success = true;
-
 
5262
    __done = true;
-
 
5263
#endif
5245
}
5264
}
5246
 
5265
 
5247
void MainWindow::stopSound()
5266
void MainWindow::stopSound()
5248
{
5267
{
5249
    DECL_TRACER("MainWindow::stopSound()");
5268
    DECL_TRACER("MainWindow::stopSound()");