diff --git a/amarok/src/collectionbrowser.cpp b/amarok/src/collectionbrowser.cpp index cb5e155b..8da6556a 100644 --- a/amarok/src/collectionbrowser.cpp +++ b/amarok/src/collectionbrowser.cpp @@ -33,8 +33,6 @@ #include "threadmanager.h" #include "qstringx.h" -#include //TagLib::File::isWritable - #include //CollectionView ctor #include @@ -3347,7 +3345,7 @@ CollectionView::setCompilation( const KURL::List &urls, bool compilation ) CollectionDB::instance()->setCompilation( urls, compilation, false ); foreachType( KURL::List, urls ) { - if ( !TagLib::File::isWritable( TQFile::encodeName( ( *it ).path() ) ) ) + if (access((*it).path().local8Bit().data(), R_OK|W_OK)) continue; MetaBundle mb( *it ); diff --git a/amarok/src/deviceconfiguredialog.cpp b/amarok/src/deviceconfiguredialog.cpp index 659ebed2..cf036fee 100644 --- a/amarok/src/deviceconfiguredialog.cpp +++ b/amarok/src/deviceconfiguredialog.cpp @@ -99,8 +99,8 @@ DeviceConfigureDialog::DeviceConfigureDialog( const Medium &medium ) m_transcodeRemove->setChecked( device->m_transcodeRemove ); const ScriptManager *sm = ScriptManager::instance(); - m_transcodeCheck->setEnabled( sm->transcodeScriptRunning() != TQString::null ); - transcodeGroup->setEnabled( sm->transcodeScriptRunning() != TQString::null && device->m_transcode ); + m_transcodeCheck->setEnabled( !sm->transcodeScriptRunning().isEmpty() ); + transcodeGroup->setEnabled( !sm->transcodeScriptRunning().isEmpty() && device->m_transcode ); if( sm->transcodeScriptRunning().isNull() ) { TQToolTip::add( m_transcodeCheck, i18n( "For this feature, a script of type \"Transcode\" has to be running" ) ); diff --git a/amarok/src/mediadevice/njb/njbmediadevice.cpp b/amarok/src/mediadevice/njb/njbmediadevice.cpp index 2d30b2fa..badd2e55 100644 --- a/amarok/src/mediadevice/njb/njbmediadevice.cpp +++ b/amarok/src/mediadevice/njb/njbmediadevice.cpp @@ -380,7 +380,7 @@ NjbMediaDevice::downloadToCollection() TQPtrList items; m_view->getSelectedLeaves( 0, &items ); - KTempDir tempdir( TQString::null ); // Default prefix is fine with us + KTempDir tempdir; // Default prefix is fine with us tempdir.setAutoDelete( true ); // We don't need it once the work is done. TQString path = tempdir.name(), filepath; KURL::List urls; diff --git a/amarok/src/metabundle.cpp b/amarok/src/metabundle.cpp index 3a6d199e..aa27b4d2 100644 --- a/amarok/src/metabundle.cpp +++ b/amarok/src/metabundle.cpp @@ -420,7 +420,7 @@ MetaBundle::init( TagLib::AudioProperties *ap ) if ( ap ) { m_bitrate = ap->bitrate(); - m_length = ap->length(); + m_length = ap->lengthInSeconds(); m_sampleRate = ap->sampleRate(); } else @@ -1338,7 +1338,7 @@ MetaBundle::setExtendedTag( TagLib::File *file, int tag, const TQString value ) if ( oggFile && oggFile->tag() ) { value.isEmpty() ? - oggFile->tag()->removeField( id ): + oggFile->tag()->removeFields( id ): oggFile->tag()->addField( id, QStringToTString( value ), true ); } } @@ -1356,7 +1356,7 @@ MetaBundle::setExtendedTag( TagLib::File *file, int tag, const TQString value ) if ( flacFile && flacFile->xiphComment() ) { value.isEmpty() ? - flacFile->xiphComment()->removeField( id ): + flacFile->xiphComment()->removeFields( id ): flacFile->xiphComment()->addField( id, QStringToTString( value ), true ); } } diff --git a/amarok/src/metadata/asf/asfattribute.cpp b/amarok/src/metadata/asf/asfattribute.cpp index 5c832431..b73bd486 100644 --- a/amarok/src/metadata/asf/asfattribute.cpp +++ b/amarok/src/metadata/asf/asfattribute.cpp @@ -23,9 +23,11 @@ #include "asfattribute.h" #include "asffile.h" +#include "tqshared.h" + using namespace TagLib; -class ASF::Attribute::AttributePrivate : public RefCounter +class ASF::Attribute::AttributePrivate : public TQShared { public: AttributePrivate() diff --git a/amarok/src/metadata/asf/asffile.cpp b/amarok/src/metadata/asf/asffile.cpp index bbe5ee5f..3000007e 100644 --- a/amarok/src/metadata/asf/asffile.cpp +++ b/amarok/src/metadata/asf/asffile.cpp @@ -252,7 +252,7 @@ ASF::File::ExtendedContentDescriptionObject::render(ASF::File *file) { data.clear(); data.append(ByteVector::fromShort(attributeData.size(), false)); - data.append(attributeData.toByteVector(ByteVector::null)); + data.append(attributeData.toByteVector(ByteVector())); return BaseObject::render(file); } @@ -279,7 +279,7 @@ ASF::File::MetadataObject::render(ASF::File *file) { data.clear(); data.append(ByteVector::fromShort(attributeData.size(), false)); - data.append(attributeData.toByteVector(ByteVector::null)); + data.append(attributeData.toByteVector(ByteVector())); return BaseObject::render(file); } @@ -306,7 +306,7 @@ ASF::File::MetadataLibraryObject::render(ASF::File *file) { data.clear(); data.append(ByteVector::fromShort(attributeData.size(), false)); - data.append(attributeData.toByteVector(ByteVector::null)); + data.append(attributeData.toByteVector(ByteVector())); return BaseObject::render(file); } diff --git a/amarok/src/metadata/asf/asftag.cpp b/amarok/src/metadata/asf/asftag.cpp index 300887e6..9056ee7e 100644 --- a/amarok/src/metadata/asf/asftag.cpp +++ b/amarok/src/metadata/asf/asftag.cpp @@ -63,7 +63,7 @@ ASF::Tag::album() const { if(d->attributeListMap.contains("WM/AlbumTitle")) return d->attributeListMap["WM/AlbumTitle"][0].toString(); - return String::null; + return String(); } String @@ -107,7 +107,7 @@ ASF::Tag::genre() const { if(d->attributeListMap.contains("WM/Genre")) return d->attributeListMap["WM/Genre"][0].toString(); - return String::null; + return String(); } void diff --git a/amarok/src/metadata/asf/asftag.h b/amarok/src/metadata/asf/asftag.h index f282dee9..f33bd09a 100644 --- a/amarok/src/metadata/asf/asftag.h +++ b/amarok/src/metadata/asf/asftag.h @@ -56,7 +56,7 @@ namespace TagLib { /*! * Returns the album name; if no album name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String album() const; @@ -66,7 +66,7 @@ namespace TagLib { virtual String comment() const; /*! - * Returns the genre name; if no genre is present in the tag String::null + * Returns the genre name; if no genre is present in the tag a null String * will be returned. */ virtual String genre() const; @@ -77,7 +77,7 @@ namespace TagLib { virtual String rating() const; /*! - * Returns the genre name; if no genre is present in the tag String::null + * Returns the genre name; if no genre is present in the tag a null String * will be returned. */ virtual String copyright() const; @@ -104,7 +104,7 @@ namespace TagLib { virtual void setArtist(const String &s); /*! - * Sets the album to \a s. If \a s is String::null then this value will be + * Sets the album to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setAlbum(const String &s); diff --git a/amarok/src/metadata/audible/audibletag.cpp b/amarok/src/metadata/audible/audibletag.cpp index f62f2155..6a02508a 100644 --- a/amarok/src/metadata/audible/audibletag.cpp +++ b/amarok/src/metadata/audible/audibletag.cpp @@ -35,11 +35,11 @@ using namespace TagLib; Audible::Tag::Tag() : TagLib::Tag::Tag() { - m_title = String::null; - m_artist = String::null; - m_album = String::null; - m_comment = String::null; - m_genre = String::null; + m_title = String(); + m_artist = String(); + m_album = String(); + m_comment = String(); + m_genre = String(); m_year = 0; m_track = 0; m_userID = 0; @@ -50,11 +50,11 @@ Audible::Tag::~Tag() { } bool Audible::Tag::isEmpty() const { - return m_title == String::null && - m_artist == String::null && - m_album == String::null && - m_comment == String::null && - m_genre == String::null && + return m_title.isEmpty() && + m_artist.isEmpty() && + m_album.isEmpty() && + m_comment.isEmpty() && + m_genre.isEmpty() && m_year == 0 && m_track == 0 && m_userID == 0; @@ -105,7 +105,7 @@ void Audible::Tag::readTags( FILE *fp ) } else if(!strcmp(name, "description")) { - if( m_comment.isNull() ) + if( m_comment.isEmpty() ) m_comment = String(value, String::Latin1); } else if(!strcmp(name, "pubdate")) diff --git a/amarok/src/metadata/audible/audibletag.h b/amarok/src/metadata/audible/audibletag.h index f03966fa..5dc16d53 100644 --- a/amarok/src/metadata/audible/audibletag.h +++ b/amarok/src/metadata/audible/audibletag.h @@ -54,30 +54,30 @@ namespace TagLib { /*! * Returns the track name; if no track name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String title() const { return m_title; } /*! * Returns the artist name; if no artist name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String artist() const { return m_artist; } /*! * Returns the album name; if no album name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String album() const { return m_album; } /*! * Returns the track comment; if no comment is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String comment() const { return m_comment; } /*! - * Returns the genre name; if no genre is present in the tag String::null + * Returns the genre name; if no genre is present in the tag a null String * will be returned. */ virtual String genre() const { return m_genre; } @@ -99,31 +99,31 @@ namespace TagLib { virtual uint userID() const { return m_userID; } /*! - * Sets the title to \a s. If \a s is String::null then this value will be + * Sets the title to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setTitle(const String &s) { m_title = s; } /*! - * Sets the artist to \a s. If \a s is String::null then this value will be + * Sets the artist to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setArtist(const String &s) { m_artist = s; } /*! - * Sets the album to \a s. If \a s is String::null then this value will be + * Sets the album to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setAlbum(const String &s) { m_album = s; } /*! - * Sets the album to \a s. If \a s is String::null then this value will be + * Sets the album to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setComment(const String &s) { m_comment = s; } /*! - * Sets the genre to \a s. If \a s is String::null then this value will be + * Sets the genre to \a s. If \a s is a null String then this value will be * cleared. For tag formats that use a fixed set of genres, the appropriate * value will be selected based on a string comparison. A list of available * genres for those formats should be available in that type's diff --git a/amarok/src/metadata/m4a/itunesalbbox.cpp b/amarok/src/metadata/m4a/itunesalbbox.cpp index 5832fa0b..c3412e57 100644 --- a/amarok/src/metadata/m4a/itunesalbbox.cpp +++ b/amarok/src/metadata/m4a/itunesalbbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesAlbBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunesartbox.cpp b/amarok/src/metadata/m4a/itunesartbox.cpp index 19e717d1..8944c950 100644 --- a/amarok/src/metadata/m4a/itunesartbox.cpp +++ b/amarok/src/metadata/m4a/itunesartbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesArtBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunescmtbox.cpp b/amarok/src/metadata/m4a/itunescmtbox.cpp index c79f0f7e..4b2c9063 100644 --- a/amarok/src/metadata/m4a/itunescmtbox.cpp +++ b/amarok/src/metadata/m4a/itunescmtbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesCmtBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunescvrbox.cpp b/amarok/src/metadata/m4a/itunescvrbox.cpp index 4a7b3dbb..0fa7ab89 100644 --- a/amarok/src/metadata/m4a/itunescvrbox.cpp +++ b/amarok/src/metadata/m4a/itunescvrbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesCvrBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunesdaybox.cpp b/amarok/src/metadata/m4a/itunesdaybox.cpp index 16568d74..4cd9c330 100644 --- a/amarok/src/metadata/m4a/itunesdaybox.cpp +++ b/amarok/src/metadata/m4a/itunesdaybox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesDayBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunesdiskbox.cpp b/amarok/src/metadata/m4a/itunesdiskbox.cpp index 93c47f2b..7cd1ad82 100644 --- a/amarok/src/metadata/m4a/itunesdiskbox.cpp +++ b/amarok/src/metadata/m4a/itunesdiskbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesDiskBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunesgenbox.cpp b/amarok/src/metadata/m4a/itunesgenbox.cpp index 08708bc4..af344aa3 100644 --- a/amarok/src/metadata/m4a/itunesgenbox.cpp +++ b/amarok/src/metadata/m4a/itunesgenbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesGenBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunesgrpbox.cpp b/amarok/src/metadata/m4a/itunesgrpbox.cpp index 061b6bda..ca512a1f 100644 --- a/amarok/src/metadata/m4a/itunesgrpbox.cpp +++ b/amarok/src/metadata/m4a/itunesgrpbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesGrpBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunesnambox.cpp b/amarok/src/metadata/m4a/itunesnambox.cpp index 6cc954bb..569258bd 100644 --- a/amarok/src/metadata/m4a/itunesnambox.cpp +++ b/amarok/src/metadata/m4a/itunesnambox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesNamBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunestmpobox.cpp b/amarok/src/metadata/m4a/itunestmpobox.cpp index 3d0ad2da..0abdfa43 100644 --- a/amarok/src/metadata/m4a/itunestmpobox.cpp +++ b/amarok/src/metadata/m4a/itunestmpobox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesTmpoBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/itunestrknbox.cpp b/amarok/src/metadata/m4a/itunestrknbox.cpp index f8d36cb1..162a954a 100644 --- a/amarok/src/metadata/m4a/itunestrknbox.cpp +++ b/amarok/src/metadata/m4a/itunestrknbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesTrknBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/ituneswrtbox.cpp b/amarok/src/metadata/m4a/ituneswrtbox.cpp index ecf3c43e..ec8d2b45 100644 --- a/amarok/src/metadata/m4a/ituneswrtbox.cpp +++ b/amarok/src/metadata/m4a/ituneswrtbox.cpp @@ -55,7 +55,7 @@ void MP4::ITunesWrtBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); // parse data box - TagLib::uint size; + uint size; MP4::Fourcc fourcc; if(mp4file->readSizeAndType( size, fourcc ) == true) diff --git a/amarok/src/metadata/m4a/mp4audiosampleentry.cpp b/amarok/src/metadata/m4a/mp4audiosampleentry.cpp index fb87547e..3c129c55 100644 --- a/amarok/src/metadata/m4a/mp4audiosampleentry.cpp +++ b/amarok/src/metadata/m4a/mp4audiosampleentry.cpp @@ -30,9 +30,9 @@ using namespace TagLib; class MP4::Mp4AudioSampleEntry::Mp4AudioSampleEntryPrivate { public: - TagLib::uint channelcount; - TagLib::uint samplerate; - TagLib::uint bitrate; + uint channelcount; + uint samplerate; + uint bitrate; }; MP4::Mp4AudioSampleEntry::Mp4AudioSampleEntry( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) @@ -46,17 +46,17 @@ MP4::Mp4AudioSampleEntry::~Mp4AudioSampleEntry() delete d; } -TagLib::uint MP4::Mp4AudioSampleEntry::channels() const +uint MP4::Mp4AudioSampleEntry::channels() const { return d->channelcount; } -TagLib::uint MP4::Mp4AudioSampleEntry::samplerate() const +uint MP4::Mp4AudioSampleEntry::samplerate() const { return d->samplerate; } -TagLib::uint MP4::Mp4AudioSampleEntry::bitrate() const +uint MP4::Mp4AudioSampleEntry::bitrate() const { return d->bitrate; } @@ -88,7 +88,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry() (fourcc() == MP4::Fourcc("drms")) ) { TagLib::MP4::Fourcc fourcc; - TagLib::uint esds_size; + uint esds_size; if (!mp4file->readSizeAndType( esds_size, fourcc )) return; @@ -104,8 +104,8 @@ void MP4::Mp4AudioSampleEntry::parseEntry() // upcoming byte must be ESDescrTag (0x03) if( EsDescrTag[0] == 0x03 ) { - TagLib::uint descr_len = mp4file->readSystemsLen(); - TagLib::uint EsId; + uint descr_len = mp4file->readSystemsLen(); + uint EsId; if( !mp4file->readShort( EsId ) ) return; ByteVector priority = mp4file->readBlock(1); @@ -114,7 +114,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry() } else { - TagLib::uint EsId; + uint EsId; if( !mp4file->readShort( EsId ) ) return; } @@ -123,7 +123,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry() if( DecCfgTag[0] != 0x04 ) return; // read decoder configuration length - // TagLib::uint deccfg_len = mp4file->readSystemsLen(); + // uint deccfg_len = mp4file->readSystemsLen(); // read object type Id ByteVector objId = mp4file->readBlock(1); // read stream type id @@ -131,7 +131,7 @@ void MP4::Mp4AudioSampleEntry::parseEntry() // read buffer Size DB ByteVector bufferSizeDB = mp4file->readBlock(3); // read max bitrate - TagLib::uint max_bitrate; + uint max_bitrate; if( !mp4file->readInt( max_bitrate ) ) return; // read average bitrate diff --git a/amarok/src/metadata/m4a/mp4audiosampleentry.h b/amarok/src/metadata/m4a/mp4audiosampleentry.h index c39c5e30..d0b5479c 100644 --- a/amarok/src/metadata/m4a/mp4audiosampleentry.h +++ b/amarok/src/metadata/m4a/mp4audiosampleentry.h @@ -36,11 +36,11 @@ namespace TagLib ~Mp4AudioSampleEntry(); //! function to get the number of channels - TagLib::uint channels() const; + uint channels() const; //! function to get the sample rate - TagLib::uint samplerate() const; + uint samplerate() const; //! function to get the average bitrate of the audio stream - TagLib::uint bitrate() const; + uint bitrate() const; private: //! parse the content of the box diff --git a/amarok/src/metadata/m4a/mp4file.cpp b/amarok/src/metadata/m4a/mp4file.cpp index 7d37d597..b210f1ec 100644 --- a/amarok/src/metadata/m4a/mp4file.cpp +++ b/amarok/src/metadata/m4a/mp4file.cpp @@ -63,7 +63,7 @@ MP4::File::File(const char *file, bool , AudioProperties::ReadStyle ) d->isValid = false; - TagLib::uint size; + uint size; MP4::Fourcc fourcc; while( readSizeAndType( size, fourcc ) == true ) @@ -126,10 +126,10 @@ void MP4::File::remove() { } -TagLib::uint MP4::File::readSystemsLen() +uint MP4::File::readSystemsLen() { - TagLib::uint length = 0; - TagLib::uint nbytes = 0; + uint length = 0; + uint nbytes = 0; ByteVector input; TagLib::uchar tmp_input; @@ -144,7 +144,7 @@ TagLib::uint MP4::File::readSystemsLen() return length; } -bool MP4::File::readSizeAndType( TagLib::uint& size, MP4::Fourcc& fourcc ) +bool MP4::File::readSizeAndType( uint& size, MP4::Fourcc& fourcc ) { // read the two blocks from file ByteVector readsize = readBlock(4); @@ -169,7 +169,7 @@ bool MP4::File::readSizeAndType( TagLib::uint& size, MP4::Fourcc& fourcc ) return true; } -bool MP4::File::readInt( TagLib::uint& toRead ) +bool MP4::File::readInt( uint& toRead ) { ByteVector readbuffer = readBlock(4); if( readbuffer.size() != 4 ) @@ -182,7 +182,7 @@ bool MP4::File::readInt( TagLib::uint& toRead ) return true; } -bool MP4::File::readShort( TagLib::uint& toRead ) +bool MP4::File::readShort( uint& toRead ) { ByteVector readbuffer = readBlock(2); if( readbuffer.size() != 2 ) @@ -295,7 +295,7 @@ void fillTagFromProxy( MP4::Mp4TagsProxy& proxy, MP4::Tag& mp4tag ) TagLib::ByteVector datavec = databox->data(); if( datavec.size() >= 4 ) { - TagLib::uint trackno = static_cast( static_cast(datavec[0]) << 24 | + uint trackno = static_cast( static_cast(datavec[0]) << 24 | static_cast(datavec[1]) << 16 | static_cast(datavec[2]) << 8 | static_cast(datavec[3]) ); @@ -342,7 +342,7 @@ void fillTagFromProxy( MP4::Mp4TagsProxy& proxy, MP4::Tag& mp4tag ) TagLib::ByteVector datavec = databox->data(); if( datavec.size() >= 4 ) { - TagLib::uint discno = static_cast( static_cast(datavec[0]) << 24 | + uint discno = static_cast( static_cast(datavec[0]) << 24 | static_cast(datavec[1]) << 16 | static_cast(datavec[2]) << 8 | static_cast(datavec[3]) ); @@ -360,7 +360,7 @@ void fillTagFromProxy( MP4::Mp4TagsProxy& proxy, MP4::Tag& mp4tag ) if( datavec.size() >= 2 ) { - TagLib::uint bpm = static_cast( static_cast(datavec[0]) << 8 | + uint bpm = static_cast( static_cast(datavec[0]) << 8 | static_cast(datavec[1]) ); mp4tag.setBpm( bpm ); } diff --git a/amarok/src/metadata/m4a/mp4file.h b/amarok/src/metadata/m4a/mp4file.h index 9e40dbc9..abe42e91 100644 --- a/amarok/src/metadata/m4a/mp4file.h +++ b/amarok/src/metadata/m4a/mp4file.h @@ -114,22 +114,22 @@ namespace TagLib { * Helper function for parsing the MP4 file - reads the size and type of the next box. * Returns true if read succeeded - not at EOF */ - bool readSizeAndType( TagLib::uint& size, MP4::Fourcc& fourcc ); + bool readSizeAndType( uint& size, MP4::Fourcc& fourcc ); /*! * Helper function to read the length of an descriptor in systems manner */ - TagLib::uint readSystemsLen(); + uint readSystemsLen(); /*! * Helper function for reading an unsigned int out of the file (big endian method) */ - bool readInt( TagLib::uint& toRead ); + bool readInt( uint& toRead ); /*! * Helper function for reading an unsigned short out of the file (big endian method) */ - bool readShort( TagLib::uint& toRead ); + bool readShort( uint& toRead ); /*! * Helper function for reading an unsigned long long (64bit) out of the file (big endian method) diff --git a/amarok/src/metadata/m4a/mp4hdlrbox.cpp b/amarok/src/metadata/m4a/mp4hdlrbox.cpp index a3ec5f72..99bbe5f8 100644 --- a/amarok/src/metadata/m4a/mp4hdlrbox.cpp +++ b/amarok/src/metadata/m4a/mp4hdlrbox.cpp @@ -30,12 +30,12 @@ using namespace TagLib; class MP4::Mp4HdlrBox::Mp4HdlrBoxPrivate { public: - TagLib::uint pre_defined; + uint pre_defined; MP4::Fourcc handler_type; TagLib::String hdlr_string; }; // class Mp4HdlrBoxPrivate -MP4::Mp4HdlrBox::Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4HdlrBox::Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoFullBox( file, fourcc, size, offset ) { d = new MP4::Mp4HdlrBox::Mp4HdlrBoxPrivate(); @@ -58,7 +58,7 @@ TagLib::String MP4::Mp4HdlrBox::hdlr_string() const void MP4::Mp4HdlrBox::parse() { - TagLib::uint totalread = 12+20; + uint totalread = 12+20; TagLib::MP4::File* mp4file = static_cast( file() ); if( mp4file->readInt( d->pre_defined ) == false ) diff --git a/amarok/src/metadata/m4a/mp4hdlrbox.h b/amarok/src/metadata/m4a/mp4hdlrbox.h index 0a6bf542..d993bc09 100644 --- a/amarok/src/metadata/m4a/mp4hdlrbox.h +++ b/amarok/src/metadata/m4a/mp4hdlrbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4HdlrBox: public Mp4IsoFullBox { public: - Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4HdlrBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4HdlrBox(); //! parse hdlr contents diff --git a/amarok/src/metadata/m4a/mp4ilstbox.cpp b/amarok/src/metadata/m4a/mp4ilstbox.cpp index 1d5ae9a3..81b6e7a9 100644 --- a/amarok/src/metadata/m4a/mp4ilstbox.cpp +++ b/amarok/src/metadata/m4a/mp4ilstbox.cpp @@ -36,7 +36,7 @@ public: MP4::BoxFactory boxfactory; }; // class Mp4IlstBoxPrivate -MP4::Mp4IlstBox::Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4IlstBox::Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4IlstBox::Mp4IlstBoxPrivate(); @@ -62,9 +62,9 @@ void MP4::Mp4IlstBox::parse() TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; #if 0 diff --git a/amarok/src/metadata/m4a/mp4ilstbox.h b/amarok/src/metadata/m4a/mp4ilstbox.h index 9e7ad1c4..43df7e5d 100644 --- a/amarok/src/metadata/m4a/mp4ilstbox.h +++ b/amarok/src/metadata/m4a/mp4ilstbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4IlstBox: public Mp4IsoBox { public: - Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4IlstBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4IlstBox(); //! parse ilst contents diff --git a/amarok/src/metadata/m4a/mp4isobox.cpp b/amarok/src/metadata/m4a/mp4isobox.cpp index 7f089241..6a559b89 100644 --- a/amarok/src/metadata/m4a/mp4isobox.cpp +++ b/amarok/src/metadata/m4a/mp4isobox.cpp @@ -28,12 +28,12 @@ class MP4::Mp4IsoBox::Mp4IsoBoxPrivate { public: MP4::Fourcc fourcc; - TagLib::uint size; + uint size; long offset; TagLib::File* file; }; -MP4::Mp4IsoBox::Mp4IsoBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4IsoBox::Mp4IsoBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) { d = new MP4::Mp4IsoBox::Mp4IsoBoxPrivate(); d->file = file; @@ -60,7 +60,7 @@ MP4::Fourcc MP4::Mp4IsoBox::fourcc() const return d->fourcc; } -TagLib::uint MP4::Mp4IsoBox::size() const +uint MP4::Mp4IsoBox::size() const { return d->size; } diff --git a/amarok/src/metadata/m4a/mp4isofullbox.cpp b/amarok/src/metadata/m4a/mp4isofullbox.cpp index f938ad44..c8963ba2 100644 --- a/amarok/src/metadata/m4a/mp4isofullbox.cpp +++ b/amarok/src/metadata/m4a/mp4isofullbox.cpp @@ -60,7 +60,7 @@ TagLib::uchar MP4::Mp4IsoFullBox::version() return d->version; } -TagLib::uint MP4::Mp4IsoFullBox::flags() +uint MP4::Mp4IsoFullBox::flags() { return d->flags; } diff --git a/amarok/src/metadata/m4a/mp4itunestag.cpp b/amarok/src/metadata/m4a/mp4itunestag.cpp index aabd6449..c3ec182d 100644 --- a/amarok/src/metadata/m4a/mp4itunestag.cpp +++ b/amarok/src/metadata/m4a/mp4itunestag.cpp @@ -31,13 +31,13 @@ public: TagLib::String artist; TagLib::String album; TagLib::String genre; - TagLib::uint year; - TagLib::uint track; + uint year; + uint track; TagLib::String comment; TagLib::String grouping; TagLib::String composer; - TagLib::uint disk; - TagLib::uint bpm; + uint disk; + uint bpm; bool isEmpty; TagLib::ByteVector cover; }; @@ -83,12 +83,12 @@ String MP4::Tag::genre() const return d->genre; } -TagLib::uint MP4::Tag::year() const +uint MP4::Tag::year() const { return d->year; } -TagLib::uint MP4::Tag::track() const +uint MP4::Tag::track() const { return d->track; } @@ -103,12 +103,12 @@ String MP4::Tag::composer() const return d->composer; } -TagLib::uint MP4::Tag::disk() const +uint MP4::Tag::disk() const { return d->disk; } -TagLib::uint MP4::Tag::bpm() const +uint MP4::Tag::bpm() const { return d->bpm; } @@ -148,13 +148,13 @@ void MP4::Tag::setGenre(const String &s) d->isEmpty = false; } -void MP4::Tag::setYear(const TagLib::uint i) +void MP4::Tag::setYear(const uint i) { d->year = i; d->isEmpty = false; } -void MP4::Tag::setTrack(const TagLib::uint i) +void MP4::Tag::setTrack(const uint i) { d->track = i; d->isEmpty = false; @@ -172,13 +172,13 @@ void MP4::Tag::setComposer(const String &s) d->isEmpty = false; } -void MP4::Tag::setDisk(const TagLib::uint i) +void MP4::Tag::setDisk(const uint i) { d->disk = i; d->isEmpty = false; } -void MP4::Tag::setBpm(const TagLib::uint i) +void MP4::Tag::setBpm(const uint i) { d->bpm = i; d->isEmpty = false; diff --git a/amarok/src/metadata/m4a/mp4mdiabox.cpp b/amarok/src/metadata/m4a/mp4mdiabox.cpp index c3b30ad3..f4e76191 100644 --- a/amarok/src/metadata/m4a/mp4mdiabox.cpp +++ b/amarok/src/metadata/m4a/mp4mdiabox.cpp @@ -38,7 +38,7 @@ public: MP4::BoxFactory boxfactory; }; // class Mp4MdiaBoxPrivate -MP4::Mp4MdiaBox::Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4MdiaBox::Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4MdiaBox::Mp4MdiaBoxPrivate(); @@ -60,9 +60,9 @@ void MP4::Mp4MdiaBox::parse() { TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; // stores the current handler type @@ -81,7 +81,7 @@ void MP4::Mp4MdiaBox::parse() // create the appropriate subclass and parse it MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() ); - if( static_cast( fourcc ) == 0x6d696e66 /*"minf"*/ ) + if( static_cast( fourcc ) == 0x6d696e66 /*"minf"*/ ) { // cast to minf Mp4MinfBox* minfbox = dynamic_cast( curbox ); @@ -94,7 +94,7 @@ void MP4::Mp4MdiaBox::parse() curbox->parsebox(); d->mdiaBoxes.append( curbox ); - if(static_cast( fourcc ) == 0x68646c72 /*"hdlr"*/ ) + if(static_cast( fourcc ) == 0x68646c72 /*"hdlr"*/ ) { // cast to hdlr box Mp4HdlrBox* hdlrbox = dynamic_cast( curbox ); diff --git a/amarok/src/metadata/m4a/mp4mdiabox.h b/amarok/src/metadata/m4a/mp4mdiabox.h index 16503bdb..da631052 100644 --- a/amarok/src/metadata/m4a/mp4mdiabox.h +++ b/amarok/src/metadata/m4a/mp4mdiabox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4MdiaBox: public Mp4IsoBox { public: - Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4MdiaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4MdiaBox(); //! parse mdia contents diff --git a/amarok/src/metadata/m4a/mp4metabox.cpp b/amarok/src/metadata/m4a/mp4metabox.cpp index 30eebf2b..2bebe2ec 100644 --- a/amarok/src/metadata/m4a/mp4metabox.cpp +++ b/amarok/src/metadata/m4a/mp4metabox.cpp @@ -36,7 +36,7 @@ public: MP4::BoxFactory boxfactory; }; // class Mp4MetaBoxPrivate -MP4::Mp4MetaBox::Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4MetaBox::Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoFullBox( file, fourcc, size, offset ) { d = new MP4::Mp4MetaBox::Mp4MetaBoxPrivate(); @@ -58,9 +58,9 @@ void MP4::Mp4MetaBox::parse() { TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 12; // initial size of box + uint totalsize = 12; // initial size of box // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; while( (mp4file->readSizeAndType( size, fourcc ) == true) ) diff --git a/amarok/src/metadata/m4a/mp4metabox.h b/amarok/src/metadata/m4a/mp4metabox.h index 58d96670..3f8847f8 100644 --- a/amarok/src/metadata/m4a/mp4metabox.h +++ b/amarok/src/metadata/m4a/mp4metabox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4MetaBox: public Mp4IsoFullBox { public: - Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4MetaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4MetaBox(); //! parse meta contents diff --git a/amarok/src/metadata/m4a/mp4minfbox.cpp b/amarok/src/metadata/m4a/mp4minfbox.cpp index 0081dda7..027f36f3 100644 --- a/amarok/src/metadata/m4a/mp4minfbox.cpp +++ b/amarok/src/metadata/m4a/mp4minfbox.cpp @@ -39,7 +39,7 @@ public: MP4::Fourcc handler_type; }; // class Mp4MinfBoxPrivate -MP4::Mp4MinfBox::Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4MinfBox::Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4MinfBox::Mp4MinfBoxPrivate(); @@ -66,9 +66,9 @@ void MP4::Mp4MinfBox::parse() { TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; while( (mp4file->readSizeAndType( size, fourcc ) == true) ) @@ -84,7 +84,7 @@ void MP4::Mp4MinfBox::parse() // create the appropriate subclass and parse it MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() ); - if(static_cast( fourcc ) == 0x7374626c /*stbl*/ ) + if(static_cast( fourcc ) == 0x7374626c /*stbl*/ ) { // cast to hdlr box Mp4StblBox* stblbox = dynamic_cast( curbox ); diff --git a/amarok/src/metadata/m4a/mp4minfbox.h b/amarok/src/metadata/m4a/mp4minfbox.h index 9195d307..bd438676 100644 --- a/amarok/src/metadata/m4a/mp4minfbox.h +++ b/amarok/src/metadata/m4a/mp4minfbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4MinfBox: public Mp4IsoBox { public: - Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4MinfBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4MinfBox(); //! parse minf contents diff --git a/amarok/src/metadata/m4a/mp4moovbox.cpp b/amarok/src/metadata/m4a/mp4moovbox.cpp index 24826ec2..2a98cacc 100644 --- a/amarok/src/metadata/m4a/mp4moovbox.cpp +++ b/amarok/src/metadata/m4a/mp4moovbox.cpp @@ -36,7 +36,7 @@ public: MP4::BoxFactory boxfactory; }; // class Mp4MoovBoxPrivate -MP4::Mp4MoovBox::Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4MoovBox::Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4MoovBox::Mp4MoovBoxPrivate(); @@ -58,9 +58,9 @@ void MP4::Mp4MoovBox::parse() { TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; while( (mp4file->readSizeAndType( size, fourcc ) == true) ) diff --git a/amarok/src/metadata/m4a/mp4moovbox.h b/amarok/src/metadata/m4a/mp4moovbox.h index 390953f7..87a8c1df 100644 --- a/amarok/src/metadata/m4a/mp4moovbox.h +++ b/amarok/src/metadata/m4a/mp4moovbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4MoovBox: public Mp4IsoBox { public: - Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4MoovBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4MoovBox(); //! parse moov contents diff --git a/amarok/src/metadata/m4a/mp4mvhdbox.cpp b/amarok/src/metadata/m4a/mp4mvhdbox.cpp index 36053e4b..3dbd31a5 100644 --- a/amarok/src/metadata/m4a/mp4mvhdbox.cpp +++ b/amarok/src/metadata/m4a/mp4mvhdbox.cpp @@ -36,18 +36,18 @@ public: //! modification time of the file - since midnight, Jan. 1, 1904, UTC-time TagLib::ulonglong modificationTime; //! timescale for the file - referred by all time specifications in this box - TagLib::uint timescale; + uint timescale; //! duration of presentation TagLib::ulonglong duration; //! playout speed - TagLib::uint rate; + uint rate; //! volume for entire presentation - TagLib::uint volume; + uint volume; //! track ID for an additional track (next new track) - TagLib::uint nextTrackID; + uint nextTrackID; }; // class Mp4MvhdBoxPrivate -MP4::Mp4MvhdBox::Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4MvhdBox::Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoFullBox( file, fourcc, size, offset ) { d = new MP4::Mp4MvhdBox::Mp4MvhdBoxPrivate(); @@ -68,7 +68,7 @@ TagLib::ulonglong MP4::Mp4MvhdBox::modificationTime() const return d->modificationTime; } -TagLib::uint MP4::Mp4MvhdBox::timescale() const +uint MP4::Mp4MvhdBox::timescale() const { return d->timescale; } @@ -78,17 +78,17 @@ TagLib::ulonglong MP4::Mp4MvhdBox::duration() const return d->duration; } -TagLib::uint MP4::Mp4MvhdBox::rate() const +uint MP4::Mp4MvhdBox::rate() const { return d->rate; } -TagLib::uint MP4::Mp4MvhdBox::volume() const +uint MP4::Mp4MvhdBox::volume() const { return d->volume; } -TagLib::uint MP4::Mp4MvhdBox::nextTrackID() const +uint MP4::Mp4MvhdBox::nextTrackID() const { return d->nextTrackID; } @@ -111,7 +111,7 @@ void MP4::Mp4MvhdBox::parse() } else { - TagLib::uint creationTime_tmp, modificationTime_tmp, duration_tmp; + uint creationTime_tmp, modificationTime_tmp, duration_tmp; if( !mp4file->readInt( creationTime_tmp ) ) return; diff --git a/amarok/src/metadata/m4a/mp4mvhdbox.h b/amarok/src/metadata/m4a/mp4mvhdbox.h index b133485e..ba15e4e2 100644 --- a/amarok/src/metadata/m4a/mp4mvhdbox.h +++ b/amarok/src/metadata/m4a/mp4mvhdbox.h @@ -33,7 +33,7 @@ namespace TagLib class Mp4MvhdBox: public Mp4IsoFullBox { public: - Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4MvhdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4MvhdBox(); //! function to get the creation time of the mp4 file diff --git a/amarok/src/metadata/m4a/mp4propsproxy.cpp b/amarok/src/metadata/m4a/mp4propsproxy.cpp index ebee9c29..70f38491 100644 --- a/amarok/src/metadata/m4a/mp4propsproxy.cpp +++ b/amarok/src/metadata/m4a/mp4propsproxy.cpp @@ -45,15 +45,15 @@ MP4::Mp4PropsProxy::~Mp4PropsProxy() delete d; } -TagLib::uint MP4::Mp4PropsProxy::seconds() const +uint MP4::Mp4PropsProxy::seconds() const { if( d->mvhdbox ) - return static_cast( d->mvhdbox->duration() / d->mvhdbox->timescale() ); + return static_cast( d->mvhdbox->duration() / d->mvhdbox->timescale() ); else return 0; } -TagLib::uint MP4::Mp4PropsProxy::channels() const +uint MP4::Mp4PropsProxy::channels() const { if( d->audiosampleentry ) return d->audiosampleentry->channels(); @@ -61,7 +61,7 @@ TagLib::uint MP4::Mp4PropsProxy::channels() const return 0; } -TagLib::uint MP4::Mp4PropsProxy::sampleRate() const +uint MP4::Mp4PropsProxy::sampleRate() const { if( d->audiosampleentry ) return (d->audiosampleentry->samplerate()>>16); @@ -69,7 +69,7 @@ TagLib::uint MP4::Mp4PropsProxy::sampleRate() const return 0; } -TagLib::uint MP4::Mp4PropsProxy::bitRate() const +uint MP4::Mp4PropsProxy::bitRate() const { if( d->audiosampleentry ) return (d->audiosampleentry->bitrate()); diff --git a/amarok/src/metadata/m4a/mp4propsproxy.h b/amarok/src/metadata/m4a/mp4propsproxy.h index 0ea29e2b..f6132c90 100644 --- a/amarok/src/metadata/m4a/mp4propsproxy.h +++ b/amarok/src/metadata/m4a/mp4propsproxy.h @@ -41,13 +41,13 @@ namespace TagLib ~Mp4PropsProxy(); //! function to get length of media in seconds - TagLib::uint seconds() const; + uint seconds() const; //! function to get the nunmber of channels - TagLib::uint channels() const; + uint channels() const; //! function to get the sample rate - TagLib::uint sampleRate() const; + uint sampleRate() const; //! function to get the bitrate rate - TagLib::uint bitRate() const; + uint bitRate() const; //! function to register the movie header box - mvhd void registerMvhd( MP4::Mp4MvhdBox* mvhdbox ); diff --git a/amarok/src/metadata/m4a/mp4sampleentry.cpp b/amarok/src/metadata/m4a/mp4sampleentry.cpp index e5619eaa..d74a22f4 100644 --- a/amarok/src/metadata/m4a/mp4sampleentry.cpp +++ b/amarok/src/metadata/m4a/mp4sampleentry.cpp @@ -28,7 +28,7 @@ using namespace TagLib; class MP4::Mp4SampleEntry::Mp4SampleEntryPrivate { public: - TagLib::uint data_reference_index; + uint data_reference_index; }; MP4::Mp4SampleEntry::Mp4SampleEntry( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) diff --git a/amarok/src/metadata/m4a/mp4stblbox.cpp b/amarok/src/metadata/m4a/mp4stblbox.cpp index f67de597..cfd1978d 100644 --- a/amarok/src/metadata/m4a/mp4stblbox.cpp +++ b/amarok/src/metadata/m4a/mp4stblbox.cpp @@ -39,7 +39,7 @@ public: MP4::Fourcc handler_type; }; // class Mp4StblBoxPrivate -MP4::Mp4StblBox::Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4StblBox::Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4StblBox::Mp4StblBoxPrivate(); @@ -66,9 +66,9 @@ void MP4::Mp4StblBox::parse() { TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; while( (mp4file->readSizeAndType( size, fourcc ) == true) ) @@ -86,7 +86,7 @@ void MP4::Mp4StblBox::parse() MP4::Mp4IsoBox* curbox = d->boxfactory.createInstance( mp4file, fourcc, size, mp4file->tell() ); // check for stsd - if( static_cast(fourcc) == 0x73747364 /*'stsd'*/ ) + if( static_cast(fourcc) == 0x73747364 /*'stsd'*/ ) { // cast to stsd box MP4::Mp4StsdBox* stsdbox = dynamic_cast(curbox); diff --git a/amarok/src/metadata/m4a/mp4stblbox.h b/amarok/src/metadata/m4a/mp4stblbox.h index 39619a6e..3eed245a 100644 --- a/amarok/src/metadata/m4a/mp4stblbox.h +++ b/amarok/src/metadata/m4a/mp4stblbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4StblBox: public Mp4IsoBox { public: - Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4StblBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4StblBox(); //! parse stbl contents diff --git a/amarok/src/metadata/m4a/mp4stsdbox.cpp b/amarok/src/metadata/m4a/mp4stsdbox.cpp index 6bb8cbe6..bd9e8f4a 100644 --- a/amarok/src/metadata/m4a/mp4stsdbox.cpp +++ b/amarok/src/metadata/m4a/mp4stsdbox.cpp @@ -36,7 +36,7 @@ public: MP4::Mp4AudioSampleEntry* audioSampleEntry; }; // class Mp4StsdBoxPrivate -MP4::Mp4StsdBox::Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4StsdBox::Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoFullBox( file, fourcc, size, offset ) { d = new MP4::Mp4StsdBox::Mp4StsdBoxPrivate(); @@ -58,19 +58,19 @@ void MP4::Mp4StsdBox::parse() if(!mp4file) return; - TagLib::uint totalsize = 12; // initial size of box + uint totalsize = 12; // initial size of box // check for handler type - only parse if 'soun': - if( static_cast(d->handler_type) == 0x736f756e ) + if( static_cast(d->handler_type) == 0x736f756e ) { // read entry count - TagLib::uint entry_count; + uint entry_count; if(!mp4file->readInt( entry_count )) return; // simply read first entry and skip all following // read size and type - TagLib::uint cursize; + uint cursize; MP4::Fourcc fourcc; if( !mp4file->readSizeAndType( cursize, fourcc )) return; diff --git a/amarok/src/metadata/m4a/mp4stsdbox.h b/amarok/src/metadata/m4a/mp4stsdbox.h index 90bc0147..54318759 100644 --- a/amarok/src/metadata/m4a/mp4stsdbox.h +++ b/amarok/src/metadata/m4a/mp4stsdbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4StsdBox: public Mp4IsoFullBox { public: - Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4StsdBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4StsdBox(); //! parse stsd contents diff --git a/amarok/src/metadata/m4a/mp4trakbox.cpp b/amarok/src/metadata/m4a/mp4trakbox.cpp index c573ec7a..4fe373ff 100644 --- a/amarok/src/metadata/m4a/mp4trakbox.cpp +++ b/amarok/src/metadata/m4a/mp4trakbox.cpp @@ -36,7 +36,7 @@ public: MP4::BoxFactory boxfactory; }; // class Mp4TrakBoxPrivate -MP4::Mp4TrakBox::Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4TrakBox::Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4TrakBox::Mp4TrakBoxPrivate(); @@ -58,9 +58,9 @@ void MP4::Mp4TrakBox::parse() { TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; while( (mp4file->readSizeAndType( size, fourcc ) == true) ) diff --git a/amarok/src/metadata/m4a/mp4trakbox.h b/amarok/src/metadata/m4a/mp4trakbox.h index b362fa32..b0f05cb3 100644 --- a/amarok/src/metadata/m4a/mp4trakbox.h +++ b/amarok/src/metadata/m4a/mp4trakbox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4TrakBox: public Mp4IsoBox { public: - Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4TrakBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4TrakBox(); //! parse trak contents diff --git a/amarok/src/metadata/m4a/mp4udtabox.cpp b/amarok/src/metadata/m4a/mp4udtabox.cpp index 268d1c1b..58a171ba 100644 --- a/amarok/src/metadata/m4a/mp4udtabox.cpp +++ b/amarok/src/metadata/m4a/mp4udtabox.cpp @@ -36,7 +36,7 @@ public: MP4::BoxFactory boxfactory; }; // class Mp4UdtaBoxPrivate -MP4::Mp4UdtaBox::Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ) +MP4::Mp4UdtaBox::Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ) : Mp4IsoBox( file, fourcc, size, offset ) { d = new MP4::Mp4UdtaBox::Mp4UdtaBoxPrivate(); @@ -61,9 +61,9 @@ void MP4::Mp4UdtaBox::parse() #endif TagLib::MP4::File* mp4file = static_cast( file() ); - TagLib::uint totalsize = 8; + uint totalsize = 8; // parse all contained boxes - TagLib::uint size; + uint size; MP4::Fourcc fourcc; #if 0 diff --git a/amarok/src/metadata/m4a/mp4udtabox.h b/amarok/src/metadata/m4a/mp4udtabox.h index 4873e321..eb982023 100644 --- a/amarok/src/metadata/m4a/mp4udtabox.h +++ b/amarok/src/metadata/m4a/mp4udtabox.h @@ -32,7 +32,7 @@ namespace TagLib class Mp4UdtaBox: public Mp4IsoBox { public: - Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, TagLib::uint size, long offset ); + Mp4UdtaBox( TagLib::File* file, MP4::Fourcc fourcc, uint size, long offset ); ~Mp4UdtaBox(); //! parse moov contents diff --git a/amarok/src/metadata/mp4/mp4file.cpp b/amarok/src/metadata/mp4/mp4file.cpp index 536955c3..e78d6ae9 100644 --- a/amarok/src/metadata/mp4/mp4file.cpp +++ b/amarok/src/metadata/mp4/mp4file.cpp @@ -129,15 +129,15 @@ bool MP4::File::save() #ifdef USE_ITMF_TAGS - MP4TagsSetName(filetags, mp4tag->title().isNull() ? "" : mp4tag->title().toCString(true)); - MP4TagsSetArtist(filetags, mp4tag->artist().isNull() ? "" : mp4tag->artist().toCString(true)); - MP4TagsSetAlbum(filetags, mp4tag->album().isNull() ? "" : mp4tag->album().toCString(true)); - MP4TagsSetComments(filetags, mp4tag->comment().isNull() ? "" : mp4tag->comment().toCString(true)); - MP4TagsSetGenre(filetags, mp4tag->genre().isNull() ? "" : mp4tag->genre().toCString(true)); - MP4TagsSetComposer(filetags, mp4tag->composer().isNull() ? "" : mp4tag->composer().toCString(true)); + MP4TagsSetName(filetags, mp4tag->title().isEmpty() ? "" : mp4tag->title().toCString(true)); + MP4TagsSetArtist(filetags, mp4tag->artist().isEmpty() ? "" : mp4tag->artist().toCString(true)); + MP4TagsSetAlbum(filetags, mp4tag->album().isEmpty() ? "" : mp4tag->album().toCString(true)); + MP4TagsSetComments(filetags, mp4tag->comment().isEmpty() ? "" : mp4tag->comment().toCString(true)); + MP4TagsSetGenre(filetags, mp4tag->genre().isEmpty() ? "" : mp4tag->genre().toCString(true)); + MP4TagsSetComposer(filetags, mp4tag->composer().isEmpty() ? "" : mp4tag->composer().toCString(true)); #else #define setmeta(val, tag) \ - if(mp4tag->val().isNull()) { \ + if(mp4tag->val().isEmpty()) { \ /*MP4DeleteMetadata##tag(handle);*/ \ MP4SetMetadata##tag(handle, ""); \ } else { \ diff --git a/amarok/src/metadata/mp4/mp4tag.cpp b/amarok/src/metadata/mp4/mp4tag.cpp index 642df2b1..24537ae5 100644 --- a/amarok/src/metadata/mp4/mp4tag.cpp +++ b/amarok/src/metadata/mp4/mp4tag.cpp @@ -38,12 +38,12 @@ email : andrew.leadbetter@gmail.com using namespace TagLib; MP4::Tag::Tag() : TagLib::Tag::Tag() { - m_title = String::null; - m_artist = String::null; - m_album = String::null; - m_comment = String::null; - m_genre = String::null; - m_composer = String::null; + m_title = String(); + m_artist = String(); + m_album = String(); + m_comment = String(); + m_genre = String(); + m_composer = String(); m_year = 0; m_track = 0; m_disk = 0; @@ -55,12 +55,12 @@ MP4::Tag::~Tag() { } bool MP4::Tag::isEmpty() const { - return m_title == String::null && - m_artist == String::null && - m_album == String::null && - m_comment == String::null && - m_genre == String::null && - m_composer == String::null && + return m_title.isEmpty() && + m_artist.isEmpty() && + m_album.isEmpty() && + m_comment.isEmpty() && + m_genre.isEmpty() && + m_composer.isEmpty() && m_year == 0 && m_track == 0 && m_disk == 0 && diff --git a/amarok/src/metadata/mp4/mp4tag.h b/amarok/src/metadata/mp4/mp4tag.h index 34f95054..f791c078 100644 --- a/amarok/src/metadata/mp4/mp4tag.h +++ b/amarok/src/metadata/mp4/mp4tag.h @@ -57,36 +57,36 @@ namespace TagLib { /*! * Returns the track name; if no track name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String title() const { return m_title; } /*! * Returns the artist name; if no artist name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String artist() const { return m_artist; } /*! * Returns the album name; if no album name is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String album() const { return m_album; } /*! * Returns the track comment; if no comment is present in the tag - * String::null will be returned. + * a null String will be returned. */ virtual String comment() const { return m_comment; } /*! - * Returns the genre name; if no genre is present in the tag String::null + * Returns the genre name; if no genre is present in the tag a null String * will be returned. */ virtual String genre() const { return m_genre; } /*! - * Returns the composer name; if no composer is present in the tag String::null + * Returns the composer name; if no composer is present in the tag a null String * will be returned. */ virtual String composer() const { return m_composer; } @@ -126,31 +126,31 @@ namespace TagLib { virtual int compilation() const { return m_compilation; } /*! - * Sets the title to \a s. If \a s is String::null then this value will be + * Sets the title to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setTitle(const String &s) { m_title = s; } /*! - * Sets the artist to \a s. If \a s is String::null then this value will be + * Sets the artist to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setArtist(const String &s) { m_artist = s; } /*! - * Sets the album to \a s. If \a s is String::null then this value will be + * Sets the album to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setAlbum(const String &s) { m_album = s; } /*! - * Sets the album to \a s. If \a s is String::null then this value will be + * Sets the album to \a s. If \a s is a null String then this value will be * cleared. */ virtual void setComment(const String &s) { m_comment = s; } /*! - * Sets the genre to \a s. If \a s is String::null then this value will be + * Sets the genre to \a s. If \a s is a null String then this value will be * cleared. For tag formats that use a fixed set of genres, the appropriate * value will be selected based on a string comparison. A list of available * genres for those formats should be available in that type's @@ -184,7 +184,7 @@ namespace TagLib { virtual void setCompilation(bool compilation) { m_compilation = compilation ? 1 : 0; } /*! - * Sets the composer to \a s. If \a s is String::null then this value will + * Sets the composer to \a s. If \a s is a null String then this value will * be cleared. */ virtual void setComposer(const String &s) { m_composer = s; } diff --git a/amarok/src/metadata/rmff/rmff.cpp b/amarok/src/metadata/rmff/rmff.cpp index da0edd55..943e24dd 100644 --- a/amarok/src/metadata/rmff/rmff.cpp +++ b/amarok/src/metadata/rmff/rmff.cpp @@ -51,7 +51,10 @@ using namespace TagLib::RealMedia; RMFFile::RMFFile(const char *filename) : File(filename), m_id3tag(0) { if (isOpen()) - m_id3tag = new ID3v1::Tag(this, length() - 128); + { + auto tagOffset = length() - 128; + m_id3tag = new ID3v1::Tag(this, tagOffset); + } } RMFFile::~RMFFile() @@ -91,12 +94,12 @@ String RealMediaFF::genre() const return !m_err && m_id3v1tag ? m_id3v1tag->tag()->genre() : ""; } -TagLib::uint RealMediaFF::year() const +uint RealMediaFF::year() const { return !m_err && m_id3v1tag ? m_id3v1tag->tag()->year() : 0; } -TagLib::uint RealMediaFF::track() const +uint RealMediaFF::track() const { return !m_err && m_id3v1tag ? m_id3v1tag->tag()->track() : 0; } diff --git a/amarok/src/metadata/rmff/rmff.h b/amarok/src/metadata/rmff/rmff.h index abc8ea23..095d8f9c 100644 --- a/amarok/src/metadata/rmff/rmff.h +++ b/amarok/src/metadata/rmff/rmff.h @@ -297,8 +297,8 @@ namespace TagLib TagLib::String album () const; TagLib::String comment () const; TagLib::String genre () const; - TagLib::uint year () const; - TagLib::uint track () const; + uint year () const; + uint track () const; // TODO write support //void setTitle (const String &s); //void setArtist (const String &s); diff --git a/amarok/src/metadata/rmff/taglib_realmediafile.cpp b/amarok/src/metadata/rmff/taglib_realmediafile.cpp index b28c8467..ec1c1439 100644 --- a/amarok/src/metadata/rmff/taglib_realmediafile.cpp +++ b/amarok/src/metadata/rmff/taglib_realmediafile.cpp @@ -78,12 +78,12 @@ String RealMedia::Tag::genre () const return m_rmff->genre(); } -TagLib::uint RealMedia::Tag::year () const +uint RealMedia::Tag::year () const { return m_rmff->year(); } -TagLib::uint RealMedia::Tag::track () const +uint RealMedia::Tag::track () const { return m_rmff->track(); } diff --git a/amarok/src/metadata/trueaudio/combinedtag.h b/amarok/src/metadata/trueaudio/combinedtag.h index 7d530d29..16d2d66c 100644 --- a/amarok/src/metadata/trueaudio/combinedtag.h +++ b/amarok/src/metadata/trueaudio/combinedtag.h @@ -49,7 +49,7 @@ namespace TagLib { if(tag2) return tag2->title(); - return String::null; + return String(); } virtual String artist() const { @@ -59,7 +59,7 @@ namespace TagLib { if(tag2) return tag2->artist(); - return String::null; + return String(); } virtual String album() const { @@ -69,7 +69,7 @@ namespace TagLib { if(tag2) return tag2->album(); - return String::null; + return String(); } virtual String comment() const { @@ -79,7 +79,7 @@ namespace TagLib { if(tag2) return tag2->comment(); - return String::null; + return String(); } virtual String genre() const { @@ -89,7 +89,7 @@ namespace TagLib { if(tag2) return tag2->genre(); - return String::null; + return String(); } virtual uint year() const { diff --git a/amarok/src/metadata/wavpack/combinedtag.h b/amarok/src/metadata/wavpack/combinedtag.h index 7d530d29..16d2d66c 100644 --- a/amarok/src/metadata/wavpack/combinedtag.h +++ b/amarok/src/metadata/wavpack/combinedtag.h @@ -49,7 +49,7 @@ namespace TagLib { if(tag2) return tag2->title(); - return String::null; + return String(); } virtual String artist() const { @@ -59,7 +59,7 @@ namespace TagLib { if(tag2) return tag2->artist(); - return String::null; + return String(); } virtual String album() const { @@ -69,7 +69,7 @@ namespace TagLib { if(tag2) return tag2->album(); - return String::null; + return String(); } virtual String comment() const { @@ -79,7 +79,7 @@ namespace TagLib { if(tag2) return tag2->comment(); - return String::null; + return String(); } virtual String genre() const { @@ -89,7 +89,7 @@ namespace TagLib { if(tag2) return tag2->genre(); - return String::null; + return String(); } virtual uint year() const { diff --git a/amarok/src/scriptmanager.cpp b/amarok/src/scriptmanager.cpp index 96b7e4be..55f8f186 100644 --- a/amarok/src/scriptmanager.cpp +++ b/amarok/src/scriptmanager.cpp @@ -570,14 +570,14 @@ ScriptManager::slotRunScript( bool silent ) TQListViewItem* const li = m_gui->listView->currentItem(); const TQString name = li->text( 0 ); - if( m_scripts[name].type == "lyrics" && lyricsScriptRunning() != TQString() ) { + if( m_scripts[name].type == "lyrics" && !lyricsScriptRunning().isEmpty() ) { if( !silent ) KMessageBox::sorry( 0, i18n( "Another lyrics script is already running. " "You may only run one lyrics script at a time." ) ); return false; } - if( m_scripts[name].type == "transcode" && transcodeScriptRunning() != TQString() ) { + if( m_scripts[name].type == "transcode" && !transcodeScriptRunning().isEmpty() ) { if( !silent ) KMessageBox::sorry( 0, i18n( "Another transcode script is already running. " "You may only run one transcode script at a time." ) ); diff --git a/amarok/src/starmanager.cpp b/amarok/src/starmanager.cpp index 314c9c7a..74e3193c 100644 --- a/amarok/src/starmanager.cpp +++ b/amarok/src/starmanager.cpp @@ -106,7 +106,7 @@ StarManager::reinitStars( int height, int margin ) CollectionView::instance()->triggerUpdate(); // FIXME // Not ideal but should work sufficiently for now - emit ratingsColorsChanged(TQString::null); + emit ratingsColorsChanged(TQString()); } TQPixmap* diff --git a/amarok/src/tagdialog.cpp b/amarok/src/tagdialog.cpp index 3978fce9..3b9375bd 100644 --- a/amarok/src/tagdialog.cpp +++ b/amarok/src/tagdialog.cpp @@ -18,8 +18,6 @@ #include "tagguesserconfigdialog.h" #include "trackpickerdialog.h" -#include //TagLib::File::isWritable - #include #include #include @@ -1415,8 +1413,7 @@ TagDialog::openURLRequest(const KURL &url ) //SLOT bool TagDialog::writeTag( MetaBundle &mb, bool updateCB ) { - TQCString path = TQFile::encodeName( mb.url().path() ); - if ( !TagLib::File::isWritable( path ) ) { + if (access(mb.url().path().local8Bit().data(), R_OK|W_OK)) { Amarok::StatusBar::instance()->longMessage( i18n( "The file %1 is not writable." ).arg( mb.url().fileName() ), KDE::StatusBar::Error ); return false; @@ -1455,8 +1452,7 @@ bool TagDialogWriter::doJob() { for( int i = 0, size=m_tags.size(); ilongMessageThreadSafe( i18n( "The file %1 is not writable." ).arg( m_tags[i].url().fileName() ), KDE::StatusBar::Error ); m_failed += true;