diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /k9decmpeg/k9plaympeg2.cpp | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'k9decmpeg/k9plaympeg2.cpp')
-rw-r--r-- | k9decmpeg/k9plaympeg2.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/k9decmpeg/k9plaympeg2.cpp b/k9decmpeg/k9plaympeg2.cpp index cc304a6..f5ff3d7 100644 --- a/k9decmpeg/k9plaympeg2.cpp +++ b/k9decmpeg/k9plaympeg2.cpp @@ -14,7 +14,7 @@ #include "dvdnav.h" #include <klocale.h> -#include <qapplication.h> +#include <tqapplication.h> k9PlayMPEG2::k9PlayMPEG2() { @@ -55,7 +55,7 @@ void k9PlayMPEG2::playTitle() { /* set read ahead cache usage */ if (dvdnav_set_readahead_flag(dvdnav, DVD_READ_CACHE) != DVDNAV_STATUS_OK) { - setError(QString("ERR:Error on dvdnav_set_readahead_flag: %1\n").arg(dvdnav_err_to_string(dvdnav))); + setError(TQString("ERR:Error on dvdnav_set_readahead_flag: %1\n").tqarg(dvdnav_err_to_string(dvdnav))); return; } @@ -63,14 +63,14 @@ void k9PlayMPEG2::playTitle() { if (dvdnav_menu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK || dvdnav_audio_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK || dvdnav_spu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK) { - setError(QString("ERR:Error on setting languages: %1\n").arg(dvdnav_err_to_string(dvdnav))); + setError(TQString("ERR:Error on setting languages: %1\n").tqarg(dvdnav_err_to_string(dvdnav))); return ; } /* set the PGC positioning flag to have position information relatively to the * whole feature instead of just relatively to the current chapter */ if (dvdnav_set_PGC_positioning_flag(dvdnav, 1) != DVDNAV_STATUS_OK) { - setError(QString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").arg(dvdnav_err_to_string(dvdnav))); + setError(TQString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").tqarg(dvdnav_err_to_string(dvdnav))); return ; } @@ -84,7 +84,7 @@ void k9PlayMPEG2::playTitle() { /* the read loop which regularly calls dvdnav_get_next_block * and handles the returned events */ - while (!finished && !m_stopped && qApp!=NULL) { + while (!finished && !m_stopped && tqApp!=NULL) { int result, event, len; uint8_t *buf = mem; @@ -105,7 +105,7 @@ void k9PlayMPEG2::playTitle() { if (result == DVDNAV_STATUS_ERR) { - setError(QString("ERR:Error getting next block: %1\n").arg(dvdnav_err_to_string(dvdnav))); + setError(TQString("ERR:Error getting next block: %1\n").tqarg(dvdnav_err_to_string(dvdnav))); return; } @@ -121,9 +121,9 @@ void k9PlayMPEG2::playTitle() { if (finished==0 && buf[17]==0xE0) { m_decoder.addData( buf,len); } - if (qApp->tryLock()) { + if (tqApp->tryLock()) { emit setPosition( pos); - qApp->unlock(); + tqApp->unlock(); } @@ -237,12 +237,12 @@ kDecMPEG2 *k9PlayMPEG2::getDecoder() { return m_decoder.getDecoder() ; } -void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter=0) { +void k9PlayMPEG2::open (dvd_reader_t *dvd,const TQString & device,k9DVDTitle * title,int chapter=0) { m_dvd=dvd; m_chapter=chapter; int ret = 0; struct stat dvd_stat; - QString c; + TQString c; m_idxLect=0xFFFFFFFF; stop(); @@ -254,7 +254,7 @@ void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * ti m_lastSector=0; ret = stat(device.utf8(), &dvd_stat); /* if ( ret < 0 ) { - c=i18n("Can't find device %1\n").arg(device.latin1()); + c=i18n("Can't find device %1\n").tqarg(device.latin1()); setError(c); return; } @@ -268,7 +268,7 @@ void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * ti emit setMax( m_lastSector); emit setMin( m_startSector); - m_decoder.start(QThread::LowPriority); + m_decoder.start(TQThread::LowPriority); start(); } |