Commit 8d3c2919 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

can build with Qt4

parent 3a31ad0d
......@@ -17,3 +17,6 @@ EXTRA_DIST = admin debian AUTHORS COPYING ChangeLog INSTALL README make_qtonly.s
pch:
$(MAKE) -C kid3 pch
# modify Makefiles to build with Qt4
qt4-Makefile:
sed -i.Qt3 -e 's#-I/usr/share/qt[3]/include#-I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtXml#g; s#-l[q]t-mt#-lQtCore -lQtGui -lQtNetwork -lQtXml -lQt3Support#g; s#\(-D[Q]T_THREAD_SUPPORT\)#\1 -DQT3_SUPPORT#g; s#qt[3]#qt4#g; s#\($$([M]OC)\)#\1 $$(DEFS) $$(DEFAULT_INCLUDES) $$(INCLUDES)#g' Makefile kid3/Makefile
......@@ -31,24 +31,27 @@ BUILT_SOURCES =
CLEANFILES = allsys.h allsys.h.gch
# these are the headers for your project that won't be installed
noinst_HEADERS = configdialog.h exportdialog.h filelist.h filelistitem.h formatbox.h formatconfig.h framelist.h freedbclient.h freedbconfig.h freedbdialog.h generalconfig.h genres.h id3form.h importconfig.h importdialog.h importparser.h importselector.h kid3.h miscconfig.h mp3file.h rendirdialog.h standardtags.h dirlist.h taggedfile.h mp3framelist.h musicbrainzclient.h musicbrainzconfig.h musicbrainzdialog.h numbertracksdialog.h oggfile.h oggframelist.h vcedit.h flacfile.h flacframelist.h commandstable.h taglibfile.h taglibframelist.h urllinkframe.h unsynchronizedlyricsframe.h importsourceconfig.h importsourcedialog.h importsourceclient.h discogsdialog.h discogsclient.h discogsconfig.h musicbrainzreleasedialog.h musicbrainzreleaseclient.h
noinst_HEADERS = configdialog.h exportdialog.h filelist.h filelistitem.h formatbox.h formatconfig.h framelist.h freedbclient.h freedbconfig.h freedbdialog.h generalconfig.h genres.h id3form.h importconfig.h importdialog.h importparser.h importselector.h kid3.h miscconfig.h mp3file.h rendirdialog.h standardtags.h dirlist.h taggedfile.h mp3framelist.h musicbrainzclient.h musicbrainzconfig.h musicbrainzdialog.h numbertracksdialog.h oggfile.h oggframelist.h vcedit.h flacfile.h flacframelist.h commandstable.h taglibfile.h taglibframelist.h urllinkframe.h unsynchronizedlyricsframe.h importsourceconfig.h importsourcedialog.h importsourceclient.h discogsdialog.h discogsclient.h discogsconfig.h musicbrainzreleasedialog.h musicbrainzreleaseclient.h qtcompatmac.h
# additional files in distribution
EXTRA_DIST = kid3.desktop kid3ui.rc hi16-app-kid3.png hi32-app-kid3.png hi48-app-kid3.png de_qt.po ru_qt.po
# generate precompiled header allsys.h.gch for GCC 3.4
pch:
echo "/* automatically generated by Makefile */" >allsys.h
echo "#ifndef ALLSYS_H" >>allsys.h
echo "#define ALLSYS_H" >>allsys.h
if CONFIG_USE_KDE
cat $(patsubst %,$(srcdir)/%,$(kid3_SOURCES)) | grep "#include *<" | grep -v "\(winsock\|sys/utime\|tunepimp\|taglib\)" | sort | uniq >>allsys.h
cat $(patsubst %,$(srcdir)/%,$(kid3_SOURCES)) | grep "#include *<" | sort | uniq >allheaders.h
else
cat $(patsubst %,$(srcdir)/%,$(kid3_SOURCES)) | grep "#include *<" | grep -v "\(winsock\|sys/utime\|tunepimp\|taglib\|<k\)" | sort | uniq >>allsys.h
cat $(patsubst %,$(srcdir)/%,$(kid3_SOURCES)) | grep "#include *<" | grep -v "<k" | sort | uniq >allheaders.h
endif
$(CXX) -E $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -Winvalid-pch $(CXXFLAGS) $(KDE_CXXFLAGS) allheaders.h -o /dev/null 2>&1 | grep "No such file" | sed -e 's/^.*error: \(.*\): No such file.*$$/#include <\1>/' >missingheaders.h
echo "/* automatically generated by Makefile */" >allsys.h
echo "#ifndef ALLSYS_H" >>allsys.h
echo "#define ALLSYS_H" >>allsys.h
cat allheaders.h missingheaders.h | sort | uniq -u >>allsys.h
echo "#endif" >>allsys.h
$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -Winvalid-pch $(CXXFLAGS) $(KDE_CXXFLAGS) allsys.h
echo "#error precompiled header not used!" >>allsys.h
rm allheaders.h missingheaders.h
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO
......
......@@ -16,7 +16,11 @@
#define I18N_NOOP(s) QT_TR_NOOP(s)
#endif
#if QT_VERSION >= 0x040000
#include <Q3PopupMenu>
#else
#include <qpopupmenu.h>
#endif
/**
* Constructor.
......@@ -26,7 +30,7 @@
* @param name Qt object name
*/
CommandsTable::CommandsTable(QWidget* parent, const char* name) :
QTable(parent, name) {
Q3Table(parent, name) {
setNumCols(2);
horizontalHeader()->setLabel(0, i18n("Confirm"));
horizontalHeader()->setLabel(1, i18n("Command"));
......@@ -74,7 +78,7 @@ void CommandsTable::valueChanged(int row, int col)
void CommandsTable::insertRow(int row)
{
insertRows(row + 1);
setItem(row + 1, 0, new QCheckTableItem(this, ""));
setItem(row + 1, 0, new Q3CheckTableItem(this, ""));
}
/**
......@@ -95,8 +99,8 @@ void CommandsTable::deleteRow(int row)
void CommandsTable::clearRow(int row)
{
setText(row, 1, "");
QTableItem* ti = item(row, 0);
QCheckTableItem* cti = dynamic_cast<QCheckTableItem*>(ti);
Q3TableItem* ti = item(row, 0);
Q3CheckTableItem* cti = dynamic_cast<Q3CheckTableItem*>(ti);
if (cti) {
cti->setChecked(false);
}
......@@ -111,7 +115,7 @@ void CommandsTable::clearRow(int row)
*/
void CommandsTable::contextMenu(int row, int /* col */, const QPoint& pos)
{
QPopupMenu menu(this);
Q3PopupMenu menu(this);
if (row >= -1) {
menu.insertItem(i18n("&Insert row"), this, SLOT(insertRow(int)), 0, 0);
......@@ -149,7 +153,7 @@ void CommandsTable::setCommandList(const QStringList& cmdList)
}
if (!cmd.isEmpty()) {
insertRows(row);
QCheckTableItem* cti = new QCheckTableItem(this, "");
Q3CheckTableItem* cti = new Q3CheckTableItem(this, "");
if (cti) {
cti->setChecked(confirm);
setItem(row, 0, cti);
......@@ -176,8 +180,8 @@ void CommandsTable::getCommandList(QStringList& cmdList) const
for (int row = 0; row < nrRows; ++row) {
QString cmd = text(row, 1);
if (!cmd.isEmpty()) {
QTableItem* ti = item(row, 0);
QCheckTableItem* cti = dynamic_cast<QCheckTableItem*>(ti);
Q3TableItem* ti = item(row, 0);
Q3CheckTableItem* cti = dynamic_cast<Q3CheckTableItem*>(ti);
if (cti) {
if (cti->isChecked()) {
cmd = "!" + cmd;
......
......@@ -10,11 +10,16 @@
#ifndef COMMANDSTABLE_H
#define COMMANDSTABLE_H
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <Q3Table>
#else
#include <qtable.h>
#endif
class QStringList;
class CommandsTable : public QTable {
class CommandsTable : public Q3Table {
Q_OBJECT
public:
......
......@@ -21,9 +21,16 @@
#include <qlabel.h>
#include <qstring.h>
#include <qcheckbox.h>
#include <qgroupbox.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <Q3GroupBox>
#else
#include <qgroupbox.h>
#endif
#include "formatconfig.h"
#include "formatbox.h"
......@@ -44,21 +51,27 @@ ConfigDialog::ConfigDialog(QWidget* parent, QString& caption,
IconList, Ok | Cancel | Help, Ok, true)
#else
ConfigDialog::ConfigDialog(QWidget* parent, QString& caption) :
QTabDialog(parent, "configure", true)
Q3TabDialog(parent, "configure", true)
#endif
{
setCaption(caption);
QWidget* generalPage = new QWidget(this);
QWidget* generalPage = new QWidget;
if (generalPage) {
QVBoxLayout* vlayout = new QVBoxLayout(generalPage, 6, 6);
if (vlayout) {
QGroupBox* saveGroupBox = new QGroupBox(1, Horizontal, i18n("Save"), generalPage);
Q3GroupBox* saveGroupBox = new Q3GroupBox(1, Qt::Horizontal, i18n("Save"), generalPage);
if (saveGroupBox) {
#if QT_VERSION >= 0x040000
saveGroupBox->setInsideMargin(5);
#endif
m_preserveTimeCheckBox = new QCheckBox(i18n("&Preserve file timestamp"), saveGroupBox);
vlayout->addWidget(saveGroupBox);
}
QGroupBox* v2GroupBox = new QGroupBox(1, Horizontal, i18n("ID3v2"), generalPage);
Q3GroupBox* v2GroupBox = new Q3GroupBox(1, Qt::Horizontal, i18n("ID3v2"), generalPage);
if (v2GroupBox) {
#if QT_VERSION >= 0x040000
v2GroupBox->setInsideMargin(5);
#endif
m_totalNumTracksCheckBox = new QCheckBox(i18n("Use &track/total number of tracks format"), v2GroupBox);
#if defined HAVE_ID3LIB && defined HAVE_TAGLIB
QLabel* id3v2VersionLabel = new QLabel(i18n("&Version used for new tags:"), v2GroupBox);
......@@ -66,36 +79,36 @@ ConfigDialog::ConfigDialog(QWidget* parent, QString& caption) :
if (id3v2VersionLabel && m_id3v2VersionComboBox) {
m_id3v2VersionComboBox->insertItem(i18n("ID3v2.3.0 (id3lib)"), MiscConfig::ID3v2_3_0);
m_id3v2VersionComboBox->insertItem(i18n("ID3v2.4.0 (TagLib)"), MiscConfig::ID3v2_4_0);
#if QT_VERSION >= 0x030100
m_id3v2VersionComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
#else
m_id3v2VersionComboBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
#endif
id3v2VersionLabel->setBuddy(m_id3v2VersionComboBox);
}
#endif
vlayout->addWidget(v2GroupBox);
}
#ifdef HAVE_VORBIS
QGroupBox* vorbisGroupBox = new QGroupBox(2, Horizontal, i18n("Ogg/Vorbis"), generalPage);
Q3GroupBox* vorbisGroupBox = new Q3GroupBox(2, Qt::Horizontal, i18n("Ogg/Vorbis"), generalPage);
if (vorbisGroupBox) {
#if QT_VERSION >= 0x040000
vorbisGroupBox->setInsideMargin(5);
#endif
QLabel* commentNameLabel = new QLabel(i18n("Comment Field &Name:"), vorbisGroupBox);
m_commentNameComboBox = new QComboBox(true, vorbisGroupBox);
if (commentNameLabel && m_commentNameComboBox) {
static const char* items[] = { "COMMENT", "DESCRIPTION", 0 };
m_commentNameComboBox->insertStrList(items);
#if QT_VERSION >= 0x030100
m_commentNameComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
#else
QStringList items;
items += "COMMENT";
items += "DESCRIPTION";
m_commentNameComboBox->QCM_addItems(items);
m_commentNameComboBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
#endif
commentNameLabel->setBuddy(m_commentNameComboBox);
}
vlayout->addWidget(vorbisGroupBox);
}
#endif
QGroupBox* commandsGroupBox = new QGroupBox(1, Horizontal, i18n("Context &Menu Commands"), generalPage);
Q3GroupBox* commandsGroupBox = new Q3GroupBox(1, Qt::Horizontal, i18n("Context &Menu Commands"), generalPage);
if (commandsGroupBox) {
#if QT_VERSION >= 0x040000
commandsGroupBox->setInsideMargin(5);
#endif
m_commandsTable = new CommandsTable(commandsGroupBox, "commandsTable");
vlayout->addWidget(commandsGroupBox);
}
......@@ -109,7 +122,7 @@ ConfigDialog::ConfigDialog(QWidget* parent, QString& caption) :
#endif
}
QWidget* formatPage = new QWidget(this);
QWidget* formatPage = new QWidget;
if (formatPage) {
QVBoxLayout* vlayout = new QVBoxLayout(formatPage, 6, 6);
if (vlayout) {
......@@ -130,7 +143,7 @@ ConfigDialog::ConfigDialog(QWidget* parent, QString& caption) :
#endif
}
QWidget* proxyPage = new QWidget(this);
QWidget* proxyPage = new QWidget;
if (proxyPage) {
QVBoxLayout* vlayout = new QVBoxLayout(proxyPage, 6, 6);
if (vlayout) {
......
......@@ -18,11 +18,16 @@
#endif
#endif
#include "qtcompatmac.h"
#ifdef KID3_USE_KCONFIGDIALOG
#include <kconfigdialog.h>
#else
#if QT_VERSION >= 0x040000
#include <Q3TabDialog>
#else
#include <qtabdialog.h>
#endif
#endif
#include "formatconfig.h"
class FormatBox;
......@@ -38,7 +43,7 @@ class QLineEdit;
#ifdef KID3_USE_KCONFIGDIALOG
typedef KConfigDialog ConfigDialogBaseClass;
#else
typedef QTabDialog ConfigDialogBaseClass;
typedef Q3TabDialog ConfigDialogBaseClass;
#endif
/**
......
......@@ -15,8 +15,8 @@
/**
* Constructor.
*/
DirList::DirList(QWidget* parent, const char* name, WFlags f) :
QListBox(parent, name, f) {}
DirList::DirList(QWidget* parent, const char* name, Qt::WFlags f) :
Q3ListBox(parent, name, f) {}
/**
* Destructor.
......@@ -37,7 +37,7 @@ bool DirList::readDir(const QString& name) {
QDir dir(file.filePath());
insertStringList(dir.entryList(QDir::Dirs | QDir::Drives));
if (!m_entryToSelect.isEmpty()) {
QListBoxItem* lbi = findItem(m_entryToSelect);
Q3ListBoxItem* lbi = findItem(m_entryToSelect);
if (lbi) {
setCurrentItem(lbi);
}
......
......@@ -11,17 +11,22 @@
#define DIRLIST_H
#include <qstring.h>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <Q3ListBox>
#else
#include <qlistbox.h>
#endif
/**
* List of directories to operate on.
*/
class DirList : public QListBox {
class DirList : public Q3ListBox {
public:
/**
* Constructor.
*/
DirList(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
DirList(QWidget* parent = 0, const char* name = 0, Qt::WFlags f = 0);
/**
* Destructor.
......
......@@ -55,7 +55,7 @@ DiscogsDialog::~DiscogsDialog()
*
* @param searchStr search data received
*/
void DiscogsDialog::parseFindResults(const QCString& searchStr)
void DiscogsDialog::parseFindResults(const QByteArray& searchStr)
{
// releases have the format:
// <li><a href="/release/761529"><span style="font-size: 11pt;"><em>Amon</em> <em>Amarth</em> - The <em>Avenger</em></span></a><br>
......@@ -82,7 +82,7 @@ void DiscogsDialog::parseFindResults(const QCString& searchStr)
*
* @param albumStr album data received
*/
void DiscogsDialog::parseAlbumResults(const QCString& albumStr)
void DiscogsDialog::parseAlbumResults(const QByteArray& albumStr)
{
QRegExp nlSpaceRe("[\r\n]+\\s*");
QRegExp htmlTagRe("<[^>]+>");
......
......@@ -37,14 +37,14 @@ public:
*
* @param searchStr search data received
*/
virtual void parseFindResults(const QCString& searchStr);
virtual void parseFindResults(const QByteArray& searchStr);
/**
* Parse result of album request and populate m_trackDataVector with results.
*
* @param albumStr album data received
*/
virtual void parseAlbumResults(const QCString& albumStr);
virtual void parseAlbumResults(const QByteArray& albumStr);
};
#endif
......@@ -31,11 +31,19 @@
#include <qtextedit.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qdir.h>
#include <qapplication.h>
#include <qclipboard.h>
#include <qurl.h>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <Q3GroupBox>
#include <QTextStream>
#include <QHBoxLayout>
#include <QVBoxLayout>
#else
#include <qgroupbox.h>
#endif
/**
* Constructor.
......@@ -55,8 +63,11 @@ ExportDialog::ExportDialog(QWidget* parent) :
vlayout->addWidget(m_edit);
}
QGroupBox* fmtbox = new QGroupBox(4, Qt::Vertical, i18n("&Format"), this);
Q3GroupBox* fmtbox = new Q3GroupBox(4, Qt::Vertical, i18n("&Format"), this);
if (fmtbox) {
#if QT_VERSION >= 0x040000
fmtbox->setInsideMargin(5);
#endif
m_formatComboBox = new QComboBox(false, fmtbox, "formatComboBox");
m_formatComboBox->setEditable(true);
m_headerLineEdit = new QLineEdit(fmtbox);
......@@ -148,7 +159,7 @@ void ExportDialog::slotToFile()
#endif
if (!fn.isEmpty()) {
QFile file(fn);
if (file.open(IO_WriteOnly)) {
if (file.open(QCM_WriteOnly)) {
QTextStream stream(&file);
stream.setEncoding(QTextStream::Locale);
stream << m_edit->text();
......@@ -248,7 +259,11 @@ static QString trackDataToString(
QUrl url;
url.setFileName(tagStr[9]);
url.setProtocol("file");
tagStr[10] = url.toString(true);
tagStr[10] = url.toString(
#if QT_VERSION < 0x040000
true
#endif
);
tagStr[11] = TaggedFile::formatTime(trackData.getFileDuration());
tagStr[12] = QString::number(trackData.getFileDuration());
tagStr[13] = QString::number(numTracks);
......
......@@ -17,9 +17,14 @@
#include <qfileinfo.h>
#include <qdir.h>
#include <qstringlist.h>
#include <qpopupmenu.h>
#include <qmessagebox.h>
#if QT_VERSION >= 0x040000
#include <Q3PopupMenu>
#include <Q3Process>
#else
#include <qpopupmenu.h>
#include <qprocess.h>
#endif
#include "taggedfile.h"
#include "filelist.h"
......@@ -44,11 +49,16 @@ FileList* FileList::s_instance = 0;
/**
* Constructor.
*/
FileList::FileList(QWidget* parent, const char* name, WFlags f) :
QListBox(parent, name, f), m_process(0)
FileList::FileList(QWidget* parent, const char* name, Qt::WFlags f) :
Q3ListBox(parent, name, f), m_process(0)
{
#if QT_VERSION >= 0x040000
connect(this, SIGNAL(contextMenuRequested(Q3ListBoxItem*, const QPoint&)),
this, SLOT(contextMenu(Q3ListBoxItem*, const QPoint&)));
#else
connect(this, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)),
this, SLOT(contextMenu(QListBoxItem*, const QPoint&)));
#endif
if (s_instance) {
qWarning("The must be only one instance of FileList");
}
......@@ -71,7 +81,7 @@ FileList::~FileList()
*/
QSize FileList::sizeHint() const
{
return QSize(fontMetrics().maxWidth() * 25, QListBox::sizeHint().height());
return QSize(fontMetrics().maxWidth() * 25, Q3ListBox::sizeHint().height());
}
/**
......@@ -191,10 +201,10 @@ QString FileList::getAbsDirname(void) const
* @param item list box item
* @param pos position where context menu is drawn on screen
*/
void FileList::contextMenu(QListBoxItem* item, const QPoint& pos)
void FileList::contextMenu(Q3ListBoxItem* item, const QPoint& pos)
{
if (item && !Kid3App::s_miscCfg.m_contextMenuCommands.empty()) {
QPopupMenu menu(this);
Q3PopupMenu menu(this);
int id = 0;
for (QStringList::const_iterator
it = Kid3App::s_miscCfg.m_contextMenuCommands.begin();
......@@ -250,11 +260,11 @@ void FileList::executeContextCommand(int id)
return;
}
if (!m_process) {
m_process = new QProcess(this);
m_process = new Q3Process(this);
}
if (m_process) {
m_process->setArguments(args);
m_process->launch("");
m_process->launch(QString(""));
}
}
}
......
......@@ -11,16 +11,21 @@
#define FILELIST_H
#include <qstring.h>
#include <qlistbox.h>
#include <qsize.h>
#include "filelistitem.h"
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <Q3ListBox>
class Q3Process;
#else
#include <qlistbox.h>
class QProcess;
#endif
/**
* List of files to operate on.
*/
class FileList : public QListBox
class FileList : public Q3ListBox
{
Q_OBJECT
......@@ -28,7 +33,7 @@ public:
/**
* Constructor.
*/
FileList(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
FileList(QWidget* parent = 0, const char* name = 0, Qt::WFlags f = 0);
/**
* Destructor.
*/
......@@ -91,7 +96,11 @@ private slots:
* @param item list box item
* @param pos position where context menu is drawn on screen
*/
#if QT_VERSION >= 0x040000
void contextMenu(Q3ListBoxItem* item, const QPoint& pos);
#else
void contextMenu(QListBoxItem* item, const QPoint& pos);
#endif
/**
* Execute a context menu command.
......@@ -109,7 +118,7 @@ private:
/** current file */
FileListItem* current_item;
/** Process for context menu commands */
QProcess* m_process;
Q3Process* m_process;
/** Single instance */
static FileList* s_instance;
......
......@@ -12,6 +12,7 @@
#include <qapplication.h>
#include <qpainter.h>
#include <qpixmap.h>
/** Empty pixmap, will be allocated in constructor */
QPixmap *FileListItem::nullPixmap = 0;
......@@ -269,7 +270,7 @@ void FileListItem::setFile(TaggedFile* file)
*
* @return height.
*/
int FileListItem::height(const QListBox* lb) const
int FileListItem::height(const Q3ListBox* lb) const
{
int h = text().isEmpty() ? pixmapHeight :
QMAX(pixmapHeight, lb->fontMetrics().lineSpacing() + 1);
......@@ -283,7 +284,7 @@ int FileListItem::height(const QListBox* lb) const
*
* @return width.
*/
int FileListItem::width(const QListBox* lb) const
int FileListItem::width(const Q3ListBox* lb) const
{
if (text().isEmpty()) {
return QMAX(pixmapWidth * 2 + 6, QApplication::globalStrut().width());
......
......@@ -10,14 +10,19 @@
#ifndef FILELISTITEM_H
#define FILELISTITEM_H
#include <qlistbox.h>
#include <qpixmap.h>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <Q3ListBox>
#else
#include <qlistbox.h>
#endif
class QPainter;
class TaggedFile;
/** List box item containing tagged file */
class FileListItem : public QListBoxItem {
class FileListItem : public Q3ListBoxItem {
public:
/**
* Constructor.
......@@ -66,7 +71,7 @@ public:
*
* @return height.
*/
int height(const QListBox* lb) const;
int height(const Q3ListBox* lb) const;
/**
* Get width of item.
......@@ -75,7 +80,7 @@ public:
*
* @return width.
*/
int width(const QListBox* lb) const;
int width(const Q3ListBox* lb) const;
protected:
/**
......
......@@ -24,6 +24,10 @@
#endif
#include <cstdio>
#include <cmath>
#include "qtcompatmac.h"
#if QT_VERSION >= 0x040000
#include <Q3CString>
#endif
/**
* Constructor.
......@@ -57,7 +61,7 @@ void FlacFile::readTags(bool force)
m_comments.clear();
changedV2 = false;
m_fileRead = true;
QCString fnIn = QFile::encodeName(dirname + QDir::separator() + filename);
Q3CString fnIn = QFile::encodeName(dirname + QDir::separator() + filename);
m_fileInfo.read(0); // just to start invalid
if (!m_chain) {
m_chain = new FLAC::Metadata::Chain;
......@@ -227,7 +231,7 @@ void FlacFile::setVorbisComment(FLAC::Metadata::VorbisComment* vc)
if (!value.isEmpty()) {
// The number of bytes - not characters - has to be passed to the
// Entry constructor, thus qstrlen is used.
QCString valueCStr = value.utf8();
Q3CString valueCStr = value.utf8();
vc->insert_comment(vc->get_num_comments(),