6 changes: 5 additions & 1 deletion mythplugins/mytharchive/mytharchive/fileselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
// qt
#include <qstring.h>
#include <qstringlist.h>
//Added by qt3to4:
#include <QKeyEvent>
#include <Q3PtrList>
#include <QPixmap>

// myth
#include <mythtv/mythdialogs.h>
Expand Down Expand Up @@ -59,7 +63,7 @@ class FileSelector : public MythThemedDialog
FSTYPE m_selectorType;
QString m_filemask;
QString m_curDirectory;
QPtrList<FileData> m_fileData;
Q3PtrList<FileData> m_fileData;
QStringList m_selectedList;

//
Expand Down
20 changes: 12 additions & 8 deletions mythplugins/mytharchive/mytharchive/importnativewizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <qapplication.h>
#include <qfileinfo.h>
#include <qsqldatabase.h>
//Added by qt3to4:
#include <QKeyEvent>

// Myth
#include <mythtv/mythcontext.h>
Expand Down Expand Up @@ -403,12 +405,13 @@ void ImportNativeWizard::updateFileList()
if (d.exists())
{
// first get a list of directory's in the current directory
const QFileInfoList *list = d.entryInfoList("*", QDir::Dirs, QDir::Name);
QFileInfoListIterator it(*list);
QFileInfo *fi;
QFileInfoList list = d.entryInfoList("*", QDir::Dirs, QDir::Name);
QFileInfoList::const_iterator it = list.begin();
const QFileInfo *fi;

while ( (fi = it.current()) != 0 )
while (it != list.end())
{
fi = &(*it);
if (fi->fileName() != ".")
{
FileInfo *data = new FileInfo;
Expand All @@ -430,10 +433,11 @@ void ImportNativeWizard::updateFileList()

// second get a list of file's in the current directory
list = d.entryInfoList(m_filemask, QDir::Files, QDir::Name);
it = QFileInfoListIterator(*list);
it = list.begin();

while ( (fi = it.current()) != 0 )
while (it != list.end())
{
fi = &(*it);
FileInfo *data = new FileInfo;
data->selected = false;
data->directory = false;
Expand Down Expand Up @@ -489,7 +493,7 @@ void ImportNativeWizard::loadXML(const QString &filename)
{
QDomDocument doc("mydocument");
QFile file(filename);
if (!file.open(IO_ReadOnly))
if (!file.open(QIODevice::ReadOnly))
return;

if (!doc.setContent( &file ))
Expand Down Expand Up @@ -745,7 +749,7 @@ void ImportNativeWizard::fillSearchList(const QString &field)
{
while (query.next())
{
m_searchList << QString::fromUtf8(query.value(0).toString());
m_searchList << query.value(0).toString();
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion mythplugins/mytharchive/mytharchive/importnativewizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
// qt
#include <qstring.h>
#include <qstringlist.h>
//Added by qt3to4:
#include <QPixmap>
#include <QKeyEvent>
#include <Q3PtrList>

// myth
#include <mythtv/mythdialogs.h>
Expand Down Expand Up @@ -59,7 +63,7 @@ class ImportNativeWizard : public MythThemedDialog

QString m_filemask;
QString m_curDirectory;
QPtrList<FileInfo> m_fileData;
Q3PtrList<FileInfo> m_fileData;
QStringList m_selectedList;

//
Expand Down
26 changes: 16 additions & 10 deletions mythplugins/mytharchive/mytharchive/logviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
using namespace std;

// qt
#include <Q3TextStream>
#include <QAbstractButton>
#include <Q3HBoxLayout>
#include <QLabel>
#include <QKeyEvent>
#include <Q3VBoxLayout>
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qfile.h>

// mythtv
Expand All @@ -25,8 +31,8 @@ LogViewer::LogViewer(MythMainWindow *parent, const char *name)
{
m_updateTime = gContext->GetNumSetting("LogViewerUpdateTime", DEFAULT_UPDATE_TIME);

QVBoxLayout *vbox = new QVBoxLayout(this, (int)(15 * wmult));
QHBoxLayout *hbox = new QHBoxLayout(vbox, (int)(0 * wmult));
Q3VBoxLayout *vbox = new Q3VBoxLayout(this, (int)(15 * wmult));
Q3HBoxLayout *hbox = new Q3HBoxLayout(vbox, (int)(0 * wmult));

// Window title
QString message = tr("Log Viewer");
Expand All @@ -40,7 +46,7 @@ LogViewer::LogViewer(MythMainWindow *parent, const char *name)
label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
hbox->addWidget(label);

hbox = new QHBoxLayout(vbox, (int)(10 * wmult));
hbox = new Q3HBoxLayout(vbox, (int)(10 * wmult));
m_autoupdateCheck = new MythCheckBox( this );
m_autoupdateCheck->setBackgroundOrigin(WindowOrigin);
m_autoupdateCheck->setChecked(true);
Expand All @@ -59,7 +65,7 @@ LogViewer::LogViewer(MythMainWindow *parent, const char *name)
hbox->addWidget(label);

// listbox
hbox = new QHBoxLayout(vbox, (int)(10 * wmult));
hbox = new Q3HBoxLayout(vbox, (int)(10 * wmult));

m_listbox = new MythListBox( this );
m_listbox->setBackgroundOrigin(WindowOrigin);
Expand All @@ -71,10 +77,10 @@ LogViewer::LogViewer(MythMainWindow *parent, const char *name)
hbox->addWidget(m_listbox);


hbox = new QHBoxLayout(vbox, (int)(10 * wmult));
hbox = new Q3HBoxLayout(vbox, (int)(10 * wmult));

// cancel Button
hbox = new QHBoxLayout(vbox, (int)(10 * wmult));
hbox = new Q3HBoxLayout(vbox, (int)(10 * wmult));

m_cancelButton = new MythPushButton( this, "cancel" );
m_cancelButton->setBackgroundOrigin(WindowOrigin);
Expand Down Expand Up @@ -222,10 +228,10 @@ bool LogViewer::loadFile(QString filename, QStringList &list, int startline)
if (!file.exists())
return false;

if (file.open( IO_ReadOnly ))
if (file.open( QIODevice::ReadOnly ))
{
QString s;
QTextStream stream(&file);
Q3TextStream stream(&file);

// ignore the first startline lines
while ( !stream.atEnd() && startline > 0)
Expand Down Expand Up @@ -340,7 +346,7 @@ void LogViewer::showMenu()
m_popupMenu = new MythPopupBox(gContext->GetMainWindow(),
"logviewer menu");

QButton *button = m_popupMenu->addButton(tr("Increase Font Size"), this,
QAbstractButton *button = m_popupMenu->addButton(tr("Increase Font Size"), this,
SLOT(increaseFontSize()));

m_popupMenu->addButton(tr("Decrease Font Size"), this,
Expand Down
4 changes: 3 additions & 1 deletion mythplugins/mytharchive/mytharchive/logviewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

// qt
#include <qlayout.h>
#include <qhbox.h>
#include <q3hbox.h>
#include <qvariant.h>
//Added by qt3to4:
#include <QKeyEvent>

// myth
#include <mythtv/mythwidgets.h>
Expand Down
15 changes: 9 additions & 6 deletions mythplugins/mytharchive/mytharchive/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ bool checkProcess(const QString &lockFile)
{
// read the PID from the lock file
QFile file(lockFile);
file.open(IO_ReadOnly);
QString line;

file.open(QIODevice::ReadOnly);

file.readLine(line, 100);
QString line(file.readLine(100));

bool bOK = false;
pid_t pid = line.toInt(&bOK);
Expand Down Expand Up @@ -436,7 +436,8 @@ void runSelectMenu(QString which_menu)
}
else
{
cerr << "Couldn't find theme " << themedir << endl;
cerr << "Couldn't find theme " << themedir.toLocal8Bit().constData()
<< endl;
}
}

Expand Down Expand Up @@ -468,7 +469,8 @@ void runFormatMenu(QString which_menu)
}
else
{
cerr << "Couldn't find theme " << themedir << endl;
cerr << "Couldn't find theme " << themedir.toLocal8Bit().constData()
<< endl;
}
}

Expand Down Expand Up @@ -509,7 +511,8 @@ void runMenu(QString which_menu)
}
else
{
cerr << "Couldn't find theme " << themedir << endl;
cerr << "Couldn't find theme " << themedir.toLocal8Bit().constData()
<< endl;
}
}

Expand Down
2 changes: 2 additions & 0 deletions mythplugins/mytharchive/mytharchive/mytharchive.pro
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ macx {
QMAKE_LFLAGS += -flat_namespace -undefined suppress
}

#The following line was inserted by qt3to4
QT += xml sql opengl qt3support
49 changes: 26 additions & 23 deletions mythplugins/mytharchive/mytharchive/mythburnwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// qt
#include <qdir.h>
#include <qapplication.h>
#include <QKeyEvent>
#include <Q3TextStream>

// myth
#include <mythtv/mythcontext.h>
Expand Down Expand Up @@ -554,7 +556,7 @@ void MythburnWizard::loadEncoderProfiles()

QDomDocument doc("mydocument");
QFile file(filename);
if (!file.open(IO_ReadOnly))
if (!file.open(QIODevice::ReadOnly))
return;

if (!doc.setContent( &file ))
Expand Down Expand Up @@ -836,13 +838,14 @@ void MythburnWizard::getThemeList(void)
d.setPath(themeDir);
if (d.exists())
{
const QFileInfoList *list = d.entryInfoList("*", QDir::Dirs, QDir::Name);
QFileInfoListIterator it(*list);
QFileInfo *fi;
QFileInfoList list = d.entryInfoList("*", QDir::Dirs, QDir::Name);
QFileInfoList::const_iterator it = list.begin();
const QFileInfo *fi;

int count = 0;
while ( (fi = it.current()) != 0 )
while (it != list.end())
{
fi = &(*it++);
// only include theme directory's with a preview image
if (QFile::exists(themeDir + fi->fileName() + "/preview.png"))
{
Expand Down Expand Up @@ -935,9 +938,9 @@ QString MythburnWizard::loadFile(const QString &filename)
if (!file.exists())
return "";

if (file.open( IO_ReadOnly ))
if (file.open( QIODevice::ReadOnly ))
{
QTextStream stream(&file);
Q3TextStream stream(&file);

while ( !stream.atEnd() )
{
Expand Down Expand Up @@ -1106,21 +1109,21 @@ void MythburnWizard::getArchiveListFromDB(void)
{
// check this item is still available
QString type = query.value(1).toString();
QString filename = QString::fromUtf8(query.value(8).toString());
QString filename = query.value(8).toString();
if (isArchiveItemValid(type, filename))
{
ArchiveItem *item = new ArchiveItem;

item->id = query.value(0).toInt();
item->type = type;
item->title = QString::fromUtf8(query.value(2).toString());
item->subtitle = QString::fromUtf8(query.value(3).toString());
item->description = QString::fromUtf8(query.value(4).toString());
item->title = query.value(2).toString();
item->subtitle = query.value(3).toString();
item->description = query.value(4).toString();
item->size = query.value(5).toLongLong();
item->newsize = query.value(5).toLongLong();
item->encoderProfile = NULL;
item->startDate = QString::fromUtf8(query.value(6).toString());
item->startTime = QString::fromUtf8(query.value(7).toString());
item->startDate = query.value(6).toString();
item->startTime =query.value(7).toString();
item->filename = filename;
item->hasCutlist = hasCutList(type, filename);
item->useCutlist = false;
Expand Down Expand Up @@ -1224,11 +1227,11 @@ void MythburnWizard::createConfigFile(const QString &filename)
{
QDomElement details = doc.createElement("details");
file.appendChild(details);
details.setAttribute("title", a->title.utf8());
details.setAttribute("subtitle", a->subtitle.utf8());
details.setAttribute("startdate", a->startDate.utf8());
details.setAttribute("starttime", a->startTime.utf8());
QDomText desc = doc.createTextNode(a->description.utf8());
details.setAttribute("title", a->title);
details.setAttribute("subtitle", a->subtitle);
details.setAttribute("startdate", a->startDate);
details.setAttribute("starttime", a->startTime);
QDomText desc = doc.createTextNode(a->description);
details.appendChild(desc);
}

Expand All @@ -1242,7 +1245,7 @@ void MythburnWizard::createConfigFile(const QString &filename)
QDomElement thumb = doc.createElement("thumb");
thumbs.appendChild(thumb);
ThumbImage *thumbImage = a->thumbList.at(x);
thumb.setAttribute("caption", thumbImage->caption.utf8());
thumb.setAttribute("caption", thumbImage->caption);
thumb.setAttribute("filename", thumbImage->filename);
thumb.setAttribute("frame", (int) thumbImage->frame);
}
Expand All @@ -1263,14 +1266,14 @@ void MythburnWizard::createConfigFile(const QString &filename)

// finally save the xml to the file
QFile f(filename);
if (!f.open(IO_WriteOnly))
if (!f.open(QIODevice::WriteOnly))
{
cout << "MythburnWizard::createConfigFile: Failed to open file for writing - "
<< filename << endl;
<< filename.toLocal8Bit().constData() << endl;
return;
}

QTextStream t(&f);
Q3TextStream t(&f);
t << doc.toString(4);
f.close();
}
Expand Down Expand Up @@ -1337,7 +1340,7 @@ void MythburnWizard::showMenu()
popupMenu = new MythPopupBox(gContext->GetMainWindow(),
"popupMenu");

QButton *button;
QAbstractButton *button;
button = popupMenu->addButton(tr("Edit Details"), this, SLOT(editDetails()));
button->setFocus();

Expand Down
3 changes: 3 additions & 0 deletions mythplugins/mytharchive/mytharchive/mythburnwizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#include <mythtv/dialogbox.h>

#include "archiveutil.h"
//Added by qt3to4:
#include <QPixmap>
#include <QKeyEvent>

class MythburnWizard : public MythThemedDialog
{
Expand Down
11 changes: 6 additions & 5 deletions mythplugins/mytharchive/mytharchive/recordingselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ using namespace std;
// qt
#include <qdir.h>
#include <qdom.h>
#include <QKeyEvent>

// mythtv
#include <mythtv/mythcontext.h>
Expand Down Expand Up @@ -135,7 +136,7 @@ void RecordingSelector::showMenu()
popupMenu = new MythPopupBox(gContext->GetMainWindow(),
"popupMenu");

QButton *button;
QAbstractButton *button;
button = popupMenu->addButton(tr("Clear All"), this, SLOT(clearAll()));
button->setFocus();
popupMenu->addButton(tr("Select All"), this, SLOT(selectAll()));
Expand Down Expand Up @@ -326,9 +327,9 @@ void RecordingSelector::OKPressed()
"VALUES(:TYPE, :TITLE, :SUBTITLE, :DESCRIPTION, :STARTDATE, "
":STARTTIME, :SIZE, :FILENAME, :HASCUTLIST);");
query.bindValue(":TYPE", "Recording");
query.bindValue(":TITLE", p->title.utf8());
query.bindValue(":SUBTITLE", p->subtitle.utf8());
query.bindValue(":DESCRIPTION", p->description.utf8());
query.bindValue(":TITLE", p->title);
query.bindValue(":SUBTITLE", p->subtitle);
query.bindValue(":DESCRIPTION", p->description);
query.bindValue(":STARTDATE", p->startts.toString("dd MMM yy"));
query.bindValue(":STARTTIME", p->startts.toString("(hh:mm)"));
query.bindValue(":SIZE", p->filesize);
Expand Down Expand Up @@ -469,7 +470,7 @@ void RecordingSelector::updateSelectedList()
{
while (query.next())
{
QString filename = QString::fromUtf8(query.value(0).toString());
QString filename = query.value(0).toString();

ProgramInfo *p;
vector<ProgramInfo *>::iterator i = recordingList->begin();
Expand Down
5 changes: 4 additions & 1 deletion mythplugins/mytharchive/mytharchive/recordingselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include <mythtv/uitypes.h>
#include <mythtv/uilistbtntype.h>
#include <mythtv/dialogbox.h>
//Added by qt3to4:
#include <QKeyEvent>
#include <Q3PtrList>

class ProgramInfo;

Expand Down Expand Up @@ -47,7 +50,7 @@ class RecordingSelector : public MythThemedDialog
void wireUpTheme(void);

vector<ProgramInfo *> *recordingList;
QPtrList<ProgramInfo> selectedList;
Q3PtrList<ProgramInfo> selectedList;

UIListBtnType *recording_list;

Expand Down
31 changes: 17 additions & 14 deletions mythplugins/mytharchive/mytharchive/thumbfinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
#include <qapplication.h>
#include <qfileinfo.h>
#include <qsqldatabase.h>
#include <qprocess.h>
#include <q3process.h>
//Added by qt3to4:
#include <QKeyEvent>
#include <QPixmap>

// myth
#include <mythtv/mythcontext.h>
Expand Down Expand Up @@ -81,7 +84,7 @@ int ThumbFinder::getChapterCount(const QString &menuTheme)
menuTheme + "/theme.xml";
QDomDocument doc("mydocument");
QFile file(filename);
if (!file.open(IO_ReadOnly))
if (!file.open(QIODevice::ReadOnly))
return 0;

if (!doc.setContent(&file))
Expand Down Expand Up @@ -316,10 +319,10 @@ static bool copyFile(const QString &src, const QString &dst)
char buffer[bufferSize];
int len;

if (!s.open(IO_ReadOnly))
if (!s.open(QIODevice::ReadOnly))
return false;

if (!d.open(IO_WriteOnly))
if (!d.open(QIODevice::WriteOnly))
{
s.close();
return false;
Expand Down Expand Up @@ -384,7 +387,7 @@ void ThumbFinder::updateThumb(void)
if (item->pixmap)
delete item->pixmap;
item->pixmap = createScaledPixmap(imageFile, size.width(), size.height(),
QImage::ScaleFree);
Qt::ScaleFree);
int64_t pos = (int) ((m_currentPTS - m_startPTS) / m_frameTime);
thumb->frame = pos - m_offset;
if (itemNo != 0)
Expand Down Expand Up @@ -466,7 +469,7 @@ bool ThumbFinder::getThumbImages()

QPixmap *pixmap = createScaledPixmap(m_frameFile,
size.width(), size.height(),
QImage::ScaleFree);
Qt::ScaleFree);

ImageGridItem *item = new ImageGridItem(thumb->caption, pixmap, false, NULL);
m_imageGrid->appendItem(item);
Expand Down Expand Up @@ -510,7 +513,7 @@ bool ThumbFinder::getThumbImages()

QPixmap *pixmap = createScaledPixmap(m_frameFile,
size.width(), size.height(),
QImage::ScaleFree);
Qt::ScaleFree);

ImageGridItem *item = new ImageGridItem(thumb->caption, pixmap, false, NULL);
m_imageGrid->appendItem(item);
Expand All @@ -531,7 +534,7 @@ bool ThumbFinder::getThumbImages()
}

QPixmap *ThumbFinder::createScaledPixmap(QString filename,
int width, int height, QImage::ScaleMode mode)
int width, int height, Qt::AspectRatioMode mode)
{
QPixmap *pixmap = NULL;

Expand Down Expand Up @@ -883,7 +886,7 @@ void ThumbFinder::showMenu()
m_popupMenu = new MythPopupBox(gContext->GetMainWindow(),
"popupMenu");

QButton *button;
QAbstractButton *button;
button = m_popupMenu->addButton(tr("Exit, Save Thumbnails"), this, SLOT(menuSavePressed()));
button->setFocus();

Expand Down Expand Up @@ -920,18 +923,18 @@ void ThumbFinder::updatePositionBar(int64_t frame)
return;

QSize size = m_positionImage->GetSize();
QPixmap *pixmap = new QPixmap(size.width(), size.height(), -1);
QPixmap *pixmap = new QPixmap(size.width(), size.height());

QPainter p(pixmap);
QBrush brush(green);
QBrush brush(Qt::green);

p.setBrush(brush);
p.setPen(NoPen);
p.setPen(Qt::NoPen);
p.fillRect(0, 0, size.width(), size.height(), brush);

QMap<long long, int>::Iterator it;

brush.setColor(red);
brush.setColor(Qt::red);
double startdelta, enddelta;

for (it = m_deleteMap.begin(); it != m_deleteMap.end(); ++it)
Expand All @@ -953,7 +956,7 @@ void ThumbFinder::updatePositionBar(int64_t frame)

if (frame == 0)
frame = 1;
brush.setColor(yellow);
brush.setColor(Qt::yellow);
int pos = (int) (size.width() / ((m_archiveItem->duration * m_fps) / frame));
p.fillRect(pos, 0, 3, size.height(), brush);

Expand Down
8 changes: 6 additions & 2 deletions mythplugins/mytharchive/mytharchive/thumbfinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include <qthread.h>
#include <qstring.h>
#include <qstringlist.h>
//Added by qt3to4:
#include <QPixmap>
#include <QKeyEvent>
#include <Q3PtrList>

using namespace std;
#include <iostream>
Expand Down Expand Up @@ -54,7 +58,7 @@ class ThumbFinder : public MythThemedDialog
private:
int getChapterCount(const QString &menuTheme);
QPixmap *createScaledPixmap(QString filename, int width, int height,
QImage::ScaleMode mode);
Qt::AspectRatioMode mode);
void changeSeekAmount(bool up);
void updateThumb(void);
void updateCurrentPos(void);
Expand All @@ -64,7 +68,7 @@ class ThumbFinder : public MythThemedDialog

ArchiveItem *m_archiveItem;
int m_thumbCount;
QPtrList<ThumbImage> m_thumbList;
Q3PtrList<ThumbImage> m_thumbList;
QString m_thumbDir;

// avcodec stuff
Expand Down
23 changes: 13 additions & 10 deletions mythplugins/mytharchive/mytharchive/videoselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include <stdlib.h>
#include <unistd.h>
#include <iostream>
//Added by qt3to4:
#include <QKeyEvent>

using namespace std;

Expand Down Expand Up @@ -150,7 +152,7 @@ void VideoSelector::showMenu()
popupMenu = new MythPopupBox(gContext->GetMainWindow(),
"popupMenu");

QButton *button;
QAbstractButton *button;
button = popupMenu->addButton(tr("Clear All"), this, SLOT(clearAll()));
button->setFocus();
popupMenu->addButton(tr("Select All"), this, SLOT(selectAll()));
Expand Down Expand Up @@ -305,7 +307,8 @@ void VideoSelector::titleChanged(UIListBtnTypeItem *item)
if (file.exists())
v->size = (unsigned long long)file.size();
else
cout << "VideoSelector: Cannot find file: " << v->filename << endl;
cout << "VideoSelector: Cannot find file: "
<< v->filename.toLocal8Bit().constData() << endl;
}

filesize_text->SetText(formatSize(v->size / 1024));
Expand Down Expand Up @@ -334,9 +337,9 @@ void VideoSelector::OKPressed()
"VALUES(:TYPE, :TITLE, :SUBTITLE, :DESCRIPTION, :STARTDATE, "
":STARTTIME, :SIZE, :FILENAME, :HASCUTLIST);");
query.bindValue(":TYPE", "Video");
query.bindValue(":TITLE", v->title.utf8());
query.bindValue(":TITLE", v->title);
query.bindValue(":SUBTITLE", "");
query.bindValue(":DESCRIPTION", v->plot.utf8());
query.bindValue(":DESCRIPTION", v->plot);
query.bindValue(":STARTDATE", "");
query.bindValue(":STARTTIME", "");
query.bindValue(":SIZE", (long long)file.size());
Expand Down Expand Up @@ -425,7 +428,7 @@ vector<VideoInfo *> *VideoSelector::getVideoListFromDB(void)
while (query.next())
{
int id = query.value(0).toInt();
QString category = QString::fromUtf8(query.value(1).toString());
QString category = query.value(1).toString();
categoryMap.insert(id, category);
}
}
Expand All @@ -444,11 +447,11 @@ vector<VideoInfo *> *VideoSelector::getVideoListFromDB(void)
VideoInfo *info = new VideoInfo;

info->id = query.value(0).toInt();
info->title = QString::fromUtf8(query.value(1).toString());
info->plot = QString::fromUtf8(query.value(2).toString());
info->title = query.value(1).toString();
info->plot = query.value(2).toString();
info->size = 0; //query.value(3).toInt();
info->filename = QString::fromUtf8(query.value(4).toString()); // Utf8 ??
info->coverfile = QString::fromUtf8(query.value(5).toString()); // Utf8 ??
info->filename = query.value(4).toString();
info->coverfile = query.value(5).toString();
info->category = categoryMap[query.value(6).toInt()];
info->parentalLevel = query.value(7).toInt();
if (info->category == "")
Expand Down Expand Up @@ -527,7 +530,7 @@ void VideoSelector::updateSelectedList()
{
while (query.next())
{
QString filename = QString::fromUtf8(query.value(0).toString());
QString filename = query.value(0).toString();

VideoInfo *v;
vector<VideoInfo *>::iterator i = videoList->begin();
Expand Down
5 changes: 4 additions & 1 deletion mythplugins/mytharchive/mytharchive/videoselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include <mythtv/uitypes.h>
#include <mythtv/uilistbtntype.h>
#include <mythtv/dialogbox.h>
//Added by qt3to4:
#include <QKeyEvent>
#include <Q3PtrList>

typedef struct
{
Expand Down Expand Up @@ -59,7 +62,7 @@ class VideoSelector : public MythThemedDialog
void setParentalLevel(int which_level);

vector<VideoInfo *> *videoList;
QPtrList<VideoInfo> selectedList;
Q3PtrList<VideoInfo> selectedList;

int currentParentalLevel;
UITextType *pl_text;
Expand Down
34 changes: 18 additions & 16 deletions mythplugins/mytharchive/mytharchivehelper/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ using namespace std;
#include <qdir.h>
#include <qdom.h>
#include <qimage.h>
#include <Q3TextStream>

// MythTV headers
#include <mythtv/mythcontext.h>
Expand Down Expand Up @@ -77,13 +78,13 @@ bool NativeArchive::copyFile(const QString &source, const QString &destination)
VERBOSE(VB_JOBQUEUE, QString("copying from %1").arg(source));
VERBOSE(VB_JOBQUEUE, QString("to %2").arg(destination));

if (!srcFile.open(IO_ReadOnly))
if (!srcFile.open(QIODevice::ReadOnly))
{
VERBOSE(VB_JOBQUEUE, "ERROR: Unable to open source file");
return false;
}

if (!destFile.open(IO_WriteOnly))
if (!destFile.open(QIODevice::WriteOnly))
{
VERBOSE(VB_JOBQUEUE, "ERROR: Unable to open destination file");
VERBOSE(VB_JOBQUEUE, "Do you have write access to the directory?");
Expand Down Expand Up @@ -240,7 +241,7 @@ int NativeArchive::doNativeArchive(const QString &jobFile)

QDomDocument doc("archivejob");
QFile file(jobFile);
if (!file.open(IO_ReadOnly))
if (!file.open(QIODevice::ReadOnly))
{
VERBOSE(VB_JOBQUEUE, "Could not open job file: " + jobFile);
return 1;
Expand Down Expand Up @@ -369,7 +370,7 @@ int NativeArchive::exportRecording(QDomElement &itemNode, const QString &saveDir

title = itemNode.attribute("title");
filename = itemNode.attribute("filename");
doDelete = (itemNode.attribute("delete", "0") = "0");
doDelete = (itemNode.attribute("delete", "0") == "0");
VERBOSE(VB_JOBQUEUE, QString("Archiving %1 (%2), do delete: %3")
.arg(title).arg(filename).arg(doDelete));

Expand Down Expand Up @@ -716,13 +717,13 @@ int NativeArchive::exportRecording(QDomElement &itemNode, const QString &saveDir
QString baseName = getBaseName(filename);
QString xmlFile = saveDirectory + title + "/" + baseName + ".xml";
QFile f(xmlFile);
if (!f.open(IO_WriteOnly))
if (!f.open(QIODevice::WriteOnly))
{
VERBOSE(VB_JOBQUEUE, "MythNativeWizard: Failed to open file for writing - " + xmlFile);
return 0;
}

QTextStream t(&f);
Q3TextStream t(&f);
t << doc.toString(4);
f.close();

Expand Down Expand Up @@ -756,7 +757,7 @@ int NativeArchive::exportVideo(QDomElement &itemNode, const QString &saveDirecto

title = itemNode.attribute("title");
filename = itemNode.attribute("filename");
doDelete = (itemNode.attribute("delete", "0") = "0");
doDelete = (itemNode.attribute("delete", "0") == "0");
VERBOSE(VB_JOBQUEUE, QString("Archiving %1 (%2), do delete: %3")
.arg(title).arg(filename).arg(doDelete));

Expand Down Expand Up @@ -966,13 +967,13 @@ int NativeArchive::exportVideo(QDomElement &itemNode, const QString &saveDirecto
QFileInfo fileInfo(filename);
QString xmlFile = saveDirectory + title + "/" + fileInfo.fileName() + ".xml";
QFile f(xmlFile);
if (!f.open(IO_WriteOnly))
if (!f.open(QIODevice::WriteOnly))
{
VERBOSE(VB_JOBQUEUE, "MythNativeWizard: Failed to open file for writing - " + xmlFile);
return 0;
}

QTextStream t(&f);
Q3TextStream t(&f);
t << doc.toString(4);
f.close();

Expand Down Expand Up @@ -1006,7 +1007,7 @@ int NativeArchive::doImportArchive(const QString &xmlFile, int chanID)
// open xml file
QDomDocument doc("mydocument");
QFile file(xmlFile);
if (!file.open(IO_ReadOnly))
if (!file.open(QIODevice::ReadOnly))
{
VERBOSE(VB_JOBQUEUE, "ERROR: Failed to open file for reading - " + xmlFile);
return 1;
Expand Down Expand Up @@ -1614,7 +1615,8 @@ QString NativeArchive::findNodeText(const QDomElement &elem, const QString &node
QDomNodeList nodeList = elem.elementsByTagName(nodeName);
if (nodeList.count() < 1)
{
cout << QString("Couldn't find a '%1' element in XML file").arg(nodeName) << endl;
cout << QString("Couldn't find a '%1' element in XML file")
.arg(nodeName).toLocal8Bit().constData() << endl;
return "";
}

Expand Down Expand Up @@ -2254,13 +2256,13 @@ int getFileInfo(QString inFile, QString outFile, int lenMethod)

// finally save the xml to the file
QFile f(outFile);
if (!f.open(IO_WriteOnly))
if (!f.open(QIODevice::WriteOnly))
{
VERBOSE(VB_JOBQUEUE, "Failed to open file for writing - " + outFile);
return 1;
}

QTextStream t(&f);
Q3TextStream t(&f);
t << doc.toString(4);
f.close();

Expand All @@ -2277,14 +2279,14 @@ int getDBParamters(QString outFile)

// save the db paramters to the file
QFile f(outFile);
if (!f.open(IO_WriteOnly))
if (!f.open(QIODevice::WriteOnly))
{
cout << "MythArchiveHelper: Failed to open file for writing - "
<< outFile << endl;
<< outFile.toLocal8Bit().constData() << endl;
return 1;
}

QTextStream t(&f);
Q3TextStream t(&f);
t << params.dbHostName << endl;
t << params.dbUserName << endl;
t << params.dbPassword << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ LIBS += -lmythfreemheg-$$LIBVERSION -lmythlivemedia-$$LIBVERSION
LIBS += -lmythavutil-$$LIBVERSION
LIBS += -lmythavcodec-$$LIBVERSION
LIBS += -lmythavformat-$$LIBVERSION
#The following line was inserted by qt3to4
QT += xml sql opengl qt3support
8 changes: 0 additions & 8 deletions mythplugins/mythbrowser/AUTHORS

This file was deleted.

340 changes: 0 additions & 340 deletions mythplugins/mythbrowser/COPYING

This file was deleted.

50 changes: 0 additions & 50 deletions mythplugins/mythbrowser/ChangeLog

This file was deleted.

133 changes: 0 additions & 133 deletions mythplugins/mythbrowser/README

This file was deleted.

4 changes: 0 additions & 4 deletions mythplugins/mythbrowser/i18n/dummy.c

This file was deleted.

16 changes: 0 additions & 16 deletions mythplugins/mythbrowser/i18n/i18n.pro

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_cz.qm
Binary file not shown.
144 changes: 0 additions & 144 deletions mythplugins/mythbrowser/i18n/mythbrowser_cz.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_de.qm
Binary file not shown.
164 changes: 0 additions & 164 deletions mythplugins/mythbrowser/i18n/mythbrowser_de.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_dk.qm
Binary file not shown.
144 changes: 0 additions & 144 deletions mythplugins/mythbrowser/i18n/mythbrowser_dk.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_es.qm
Binary file not shown.
176 changes: 0 additions & 176 deletions mythplugins/mythbrowser/i18n/mythbrowser_es.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_et.qm
Binary file not shown.
144 changes: 0 additions & 144 deletions mythplugins/mythbrowser/i18n/mythbrowser_et.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_fi.qm
Binary file not shown.
168 changes: 0 additions & 168 deletions mythplugins/mythbrowser/i18n/mythbrowser_fi.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_fr.qm
Binary file not shown.
164 changes: 0 additions & 164 deletions mythplugins/mythbrowser/i18n/mythbrowser_fr.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_nb.qm
Binary file not shown.
143 changes: 0 additions & 143 deletions mythplugins/mythbrowser/i18n/mythbrowser_nb.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_nl.qm
Binary file not shown.
144 changes: 0 additions & 144 deletions mythplugins/mythbrowser/i18n/mythbrowser_nl.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_pt_br.qm
Binary file not shown.
143 changes: 0 additions & 143 deletions mythplugins/mythbrowser/i18n/mythbrowser_pt_br.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_ru.qm
Binary file not shown.
144 changes: 0 additions & 144 deletions mythplugins/mythbrowser/i18n/mythbrowser_ru.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_si.qm
Binary file not shown.
176 changes: 0 additions & 176 deletions mythplugins/mythbrowser/i18n/mythbrowser_si.ts

This file was deleted.

Binary file removed mythplugins/mythbrowser/i18n/mythbrowser_sv.qm
Binary file not shown.
Loading