All pastes #1233698 Raw Edit

Mine

public text v1 · immutable
#1233698 ·published 2008-10-22 12:13 UTC
rendered paste body
Index: programs/mythfrontend/playbackbox.cpp
===================================================================
--- programs/mythfrontend/playbackbox.cpp	(revision 18833)
+++ programs/mythfrontend/playbackbox.cpp	(working copy)
@@ -274,7 +274,7 @@
       recGroup("All Programs"),
       recGroupPassword(""),             curGroupPassword(""),
       watchGroupName(" " + tr("Watch List")),
-      watchGroupLabel(watchGroupName.lower()),
+      watchGroupLabel(watchGroupName.toLower()),
       viewMask(VIEW_TITLES),
       // Theme parsing
       theme(new XMLParse()),
@@ -370,14 +370,17 @@
     recGroupType[recGroup] = (displayCat) ? "category" : "recgroup";
     if (groupnameAsAllProg)
     {
-        groupDisplayName = recGroup;
-        if ((recGroup == "All Programs") ||
-            (recGroup == "Default") ||
-            (recGroup == "LiveTV") ||
-            (recGroup == "Deleted"))
-        {
-            groupDisplayName = tr(recGroup);
-        }
+        if (recGroup == "All Programs")
+            groupDisplayName = tr("All Programs",
+                                  "Recording Group All Programs");
+        else if (recGroup == "Default")
+            groupDisplayName = tr("Default", "Recording Group Default");
+        else if (recGroup == "LiveTV")
+            groupDisplayName = tr("LiveTV", "Recording Group LiveTV");
+        else if (recGroup == "Deleted")
+            groupDisplayName = tr("Deleted", "Recording Group Deleted");
+        else
+            groupDisplayName = recGroup;
     }
 
     if (!m_player)
@@ -615,22 +618,22 @@
     int context;
     theme->parseContainer(element, name, context, area);
 
-    if (name.lower() == "selector")
+    if (name.toLower() == "selector")
         drawListBounds = area;
-    if (name.lower() == "program_info_play" && context == 0 && type != Delete)
+    if (name.toLower() == "program_info_play" && context == 0 && type != Delete)
         drawInfoBounds = area;
-    if (name.lower() == "program_info_del" && context == 1 && type == Delete)
+    if (name.toLower() == "program_info_del" && context == 1 && type == Delete)
         drawInfoBounds = area;
-    if (name.lower() == "video")
+    if (name.toLower() == "video")
     {
         drawVideoBounds = area;
         blackholeBounds = area;
     }
-    if (name.lower() == "group_info")
+    if (name.toLower() == "group_info")
         drawGroupBounds = area;
-    if (name.lower() == "usage")
+    if (name.toLower() == "usage")
         drawUsageBounds = area;
-    if (name.lower() == "cur_group")
+    if (name.toLower() == "cur_group")
         drawCurGroupBounds = area;
 
 }
@@ -708,7 +711,9 @@
     tmp.end();
     paintBackgroundPixmap = bground;
 
-    setPaletteBackgroundPixmap(paintBackgroundPixmap);
+    QPalette p = palette();
+    p.setBrush(backgroundRole(), QBrush(paintBackgroundPixmap));
+    setPalette(p);
 }
 
 void PlaybackBox::paintEvent(QPaintEvent *e)
@@ -829,7 +834,7 @@
         }
         else
         {
-            countInGroup = progLists[titleList[titleIndex].lower()].count();
+            countInGroup = progLists[titleList[titleIndex].toLower()].count();
             infoMap["group"] = groupDisplayName;
             infoMap["show"] = titleList[titleIndex];
             infoMap["title"] = QString("%1 - %2").arg(groupDisplayName)
@@ -916,7 +921,7 @@
             itype = (UIImageType *)container->GetType(it.key());
             if (itype)
             {
-                if (flags & it.data())
+                if (flags & (*it))
                     itype->show();
                 else
                     itype->hide();
@@ -942,7 +947,7 @@
                 {
                     itype->hide();
 
-                    if (!haveaudicon && (curitem->audioproperties & it.data()))
+                    if (!haveaudicon && (curitem->audioproperties & (*it)))
                     {
                         itype->show();
                         // We only want one icon displayed
@@ -965,7 +970,7 @@
                 {
                     itype->hide();
 
-                    if (!havevidicon && (curitem->videoproperties & it.data()))
+                    if (!havevidicon && (curitem->videoproperties & (*it)))
                     {
                         itype->show();
                         // We only want one icon displayed
@@ -989,7 +994,7 @@
                 if (itype)
                 {
                     itype->hide();
-                    if (!havesubicon && (curitem->subtitleType & it.data()))
+                    if (!havesubicon && (curitem->subtitleType & (*it)))
                     {
                         itype->show();
                         // We only want one icon displayed
@@ -1361,7 +1366,7 @@
 
     ProgramList *plist;
     if (titleList.count() > 1)
-        plist = &progLists[titleList[titleIndex].lower()];
+        plist = &progLists[titleList[titleIndex].toLower()];
     else
         plist = &progLists[""];
 
@@ -1501,14 +1506,14 @@
                 if (titleList[titleIndex] != tempInfo->title)
                 {
                     tempSubTitle = tempInfo->title;
-                    if (tempInfo->subtitle.stripWhiteSpace().length() > 0)
+                    if (tempInfo->subtitle.trimmed().length() > 0)
                         tempSubTitle = tempSubTitle + " - \"" +
                                        tempInfo->subtitle + "\"";
                 }
                 else
                 {
                     tempSubTitle = tempInfo->subtitle;
-                    if (tempSubTitle.stripWhiteSpace().length() == 0)
+                    if (tempSubTitle.trimmed().length() == 0)
                         tempSubTitle = tempInfo->title;
                 }
 
@@ -1540,7 +1545,7 @@
                 if (tempInfo->recstatus == rsRecording)
                     ltype->EnableForcedFont(cnt, "recording");
 
-                if (playList.grep(tempInfo->MakeUniqueKey()).count())
+                if (playList.filter(tempInfo->MakeUniqueKey()).count())
                     ltype->EnableForcedFont(cnt, "tagged");
 
                 if (((tempInfo->recstatus != rsRecording) &&
@@ -1648,7 +1653,7 @@
     }
     else
     {
-        int progCount = progLists[titleList[titleIndex].lower()].count();
+        int progCount = progLists[titleList[titleIndex].toLower()].count();
         if (progIndex < progCount - 1)
         {
             progIndex += (page ? listsize : 1);
@@ -1730,7 +1735,7 @@
     }
     else 
     {
-        int progCount = progLists[titleList[titleIndex].lower()].count();
+        int progCount = progLists[titleList[titleIndex].toLower()].count();
 
         if (progCount > 0)
         {
@@ -1750,7 +1755,7 @@
         pageTop();
     else 
     {
-        progIndex = progLists[titleList[titleIndex].lower()].count() - 1;
+        progIndex = progLists[titleList[titleIndex].toLower()].count() - 1;
 
         paintSkipUpdate = false;
         update(drawListBounds);
@@ -1784,7 +1789,7 @@
     int oldrecpriority = 0;
     int oldrecordid = 0;
 
-    ProgramList &list = progLists[oldtitle.lower()];
+    ProgramList &list = progLists[oldtitle.toLower()];
     p = list[progIndex];
     if (p)
     {
@@ -1908,28 +1913,28 @@
                 {
                     sTitle = sortTitle(p->title, viewMask, titleSort,
                             p->recpriority);
-                    sTitle = sTitle.lower();
+                    sTitle = sTitle.toLower();
 
                     if (!sortedList.contains(sTitle))
                         sortedList[sTitle] = p->title;
-                    progLists[sortedList[sTitle].lower()].prepend(p);
-                    progLists[sortedList[sTitle].lower()].setAutoDelete(false);
+                    progLists[sortedList[sTitle].toLower()].prepend(p);
+                    progLists[sortedList[sTitle].toLower()].setAutoDelete(false);
                 }
 
                 if ((viewMask & VIEW_RECGROUPS) &&
                     p->recgroup != "") // Show recording groups
                 {
-                    sortedList[p->recgroup.lower()] = p->recgroup;
-                    progLists[p->recgroup.lower()].prepend(p);
-                    progLists[p->recgroup.lower()].setAutoDelete(false);
+                    sortedList[p->recgroup.toLower()] = p->recgroup;
+                    progLists[p->recgroup.toLower()].prepend(p);
+                    progLists[p->recgroup.toLower()].setAutoDelete(false);
                 }
 
                 if ((viewMask & VIEW_CATEGORIES) &&
                     p->category != "") // Show categories
                 {
-                    sortedList[p->category.lower()] = p->category;
-                    progLists[p->category.lower()].prepend(p);
-                    progLists[p->category.lower()].setAutoDelete(false);
+                    sortedList[p->category.toLower()] = p->category;
+                    progLists[p->category.toLower()].prepend(p);
+                    progLists[p->category.toLower()].setAutoDelete(false);
                 }
 
                 if ((viewMask & VIEW_SEARCHES) &&
@@ -1938,9 +1943,9 @@
                 {
                     QString tmpTitle = QString("(%1)")
                                                .arg(searchRule[p->recordid]);
-                    sortedList[tmpTitle.lower()] = tmpTitle;
-                    progLists[tmpTitle.lower()].prepend(p);
-                    progLists[tmpTitle.lower()].setAutoDelete(false);
+                    sortedList[tmpTitle.toLower()] = tmpTitle;
+                    progLists[tmpTitle.toLower()].prepend(p);
+                    progLists[tmpTitle.toLower()].setAutoDelete(false);
                 }
 
                 if ((LiveTVInAllPrograms) &&
@@ -1949,9 +1954,9 @@
                     (p->recgroup == "LiveTV"))
                 {
                     QString tmpTitle = QString(" %1").arg(tr("LiveTV"));
-                    sortedList[tmpTitle.lower()] = tmpTitle;
-                    progLists[tmpTitle.lower()].prepend(p);
-                    progLists[tmpTitle.lower()].setAutoDelete(false);
+                    sortedList[tmpTitle.toLower()] = tmpTitle;
+                    progLists[tmpTitle.toLower()].prepend(p);
+                    progLists[tmpTitle.toLower()].setAutoDelete(false);
                 }
 
                 if ((viewMask & VIEW_WATCHLIST) && (p->recgroup != "LiveTV"))
@@ -2013,9 +2018,9 @@
             if (!Iprog.key().isEmpty())
             {
                 if (listOrder == 0 || type == Delete)
-                    Iprog.data().sort(comp_originalAirDate_rev_less_than);
+                    (*Iprog).sort(comp_originalAirDate_rev_less_than);
                 else
-                    Iprog.data().sort(comp_originalAirDate_less_than);
+                    (*Iprog).sort(comp_originalAirDate_less_than);
             }
         }
     }
@@ -2027,9 +2032,9 @@
             if (!Iprog.key().isEmpty())
             {
                 if (listOrder == 0 || type == Delete)
-                    Iprog.data().sort(comp_programid_rev_less_than);
+                    (*Iprog).sort(comp_programid_rev_less_than);
                 else
-                    Iprog.data().sort(comp_programid_less_than);
+                    (*Iprog).sort(comp_programid_less_than);
             }
         }
     }
@@ -2244,7 +2249,7 @@
 
     QString oldsTitle = sortTitle(oldtitle, viewMask, titleSort,
             oldrecpriority);
-    oldsTitle = oldsTitle.lower();
+    oldsTitle = oldsTitle.toLower();
     titleIndex = titleList.count() - 1;
     for (titleIndex = titleList.count() - 1; titleIndex >= 0; titleIndex--)
     {
@@ -2254,7 +2259,7 @@
             break;
         }
         sTitle = sTitleList[titleIndex];
-        sTitle = sTitle.lower();
+        sTitle = sTitle.toLower();
 
         if (oldsTitle > sTitle)
         {
@@ -2273,7 +2278,7 @@
         progIndex = 0;
     else
     {
-        ProgramList *l = &progLists[oldtitle.lower()];
+        ProgramList *l = &progLists[oldtitle.toLower()];
         progIndex = l->count() - 1;
 
         for (int i = progIndex; i >= 0; i--)
@@ -2492,7 +2497,7 @@
                 playNext = play(rec, true);
             delete rec;
         }
-        randomList.remove(it);
+        randomList.erase(it);
     }
 }
 
@@ -2635,7 +2640,8 @@
 
     QLabel *label = popup->addLabel(tr("Recording List Menu"),
                                   MythPopupBox::Large, false);
-    label->setAlignment(Qt::AlignCenter | Qt::WordBreak);
+    label->setAlignment(Qt::AlignCenter);
+    label->setWordWrap(true);
 
     QAbstractButton *topButton = popup->addButton(tr("Change Group Filter"), this,
                      SLOT(showRecGroupChooser()));
@@ -2786,7 +2792,7 @@
     previewVideoBrokenRecId = rec->recordid;
     killPlayerSafe();
 
-    if (playList.grep(rec->MakeUniqueKey()).count())
+    if (playList.filter(rec->MakeUniqueKey()).count())
         togglePlayListItem(rec);
 
     if (!forceMetadataDelete)
@@ -2993,7 +2999,7 @@
         tlabel = popup->addLabel(tr("There is %1 item in the playlist.")
                                        .arg(playList.count()));
     }
-    tlabel->setAlignment(Qt::AlignCenter | Qt::WordBreak);
+    tlabel->setAlignment(Qt::AlignCenter);
 
     QAbstractButton *playButton = popup->addButton(tr("Play"), this, SLOT(doPlayList()));
 
@@ -3017,7 +3023,7 @@
 
     QLabel *label = popup->addLabel(
                         tr("These actions affect all items in the playlist"));
-    label->setAlignment(Qt::AlignCenter | Qt::WordBreak);
+    label->setAlignment(Qt::AlignCenter);
 
     popup->addButton(tr("Change Recording Group"), this,
                      SLOT(doPlaylistChangeRecGroup()));
@@ -3054,7 +3060,7 @@
         tlabel = popup->addLabel(tr("There is %1 item in the playlist.")
                                        .arg(playList.count()));
     }
-    tlabel->setAlignment(Qt::AlignCenter | Qt::WordBreak);
+    tlabel->setAlignment(Qt::AlignCenter);
 
     QAbstractButton *jobButton;
     QString jobTitle = "";
@@ -3411,7 +3417,7 @@
 
     if (!m_player)
     {
-        if (playList.grep(curitem->MakeUniqueKey()).count())
+        if (playList.filter(curitem->MakeUniqueKey()).count())
             popup->addButton(tr("Remove from Playlist"), this,
                             SLOT(togglePlayListItem()));
         else
@@ -3515,17 +3521,17 @@
     QString titl = program->title;
     titl = cutDownString(titl, &defaultBigFont, (int)(width() / 2));
 
-    if (message.stripWhiteSpace().length() > 0)
+    if (message.trimmed().length() > 0)
         popup->addLabel(message);
 
     popup->addLabel(program->title, MythPopupBox::Large);
 
-    if ((program->subtitle).stripWhiteSpace().length() > 0)
+    if ((program->subtitle).trimmed().length() > 0)
         popup->addLabel("\"" + program->subtitle + "\"\n" + timedate);
     else
         popup->addLabel(timedate);
 
-    if (message2.stripWhiteSpace().length() > 0)
+    if (message2.trimmed().length() > 0)
         popup->addLabel(message2);
 }
 
@@ -3540,7 +3546,7 @@
     paintSkipUpdate = false;
     paintSkipCount = 2;
 
-    setActiveWindow();
+    activateWindow();
 
     EmbedTVWindow();
 }
@@ -3965,10 +3971,10 @@
 {
     QStringList keyParts;
 
-    if ((key == "") || (key.find('_') < 0))
+    if ((key == "") || (key.indexOf('_') < 0))
         return NULL;
 
-    keyParts = QStringList::split("_", key);
+    keyParts = key.split("_");
 
     // ProgramInfo::MakeUniqueKey() has 2 parts separated by '_' characters
     if (keyParts.count() == 2)
@@ -4107,7 +4113,7 @@
     if (!curitem)
         return;
 
-    QString currentTitle = titleList[titleIndex].lower();
+    QString currentTitle = titleList[titleIndex].toLower();
 
     ProgramList::iterator it = progLists[currentTitle].begin();
     ProgramList::iterator end = progLists[currentTitle].end();
@@ -4154,7 +4160,7 @@
 
     QString key = pginfo->MakeUniqueKey();
 
-    if (playList.grep(key).count())
+    if (playList.filter(key).count())
     {
         QStringList tmpList;
         QStringList::Iterator it;
@@ -4212,7 +4218,7 @@
 
 void PlaybackBox::processNetworkControlCommand(QString command)
 {
-    QStringList tokens = QStringList::split(" ", command);
+    QStringList tokens = command.simplified().split(" ");
 
     if (tokens.size() >= 4 && (tokens[1] == "PLAY" || tokens[1] == "RESUME"))
     {
@@ -4275,8 +4281,12 @@
 
     // This should be an impossible keypress we've simulated
     if ((e->key() == Qt::Key_LaunchMedia) &&
-        (e->state() == (Qt::ButtonState)
-         (Qt::MouseButtonMask | Qt::KeyButtonMask)))
+        (e->modifiers() == 
+         (Qt::ShiftModifier |
+          Qt::ControlModifier |
+          Qt::AltModifier |
+          Qt::MetaModifier |
+          Qt::KeypadModifier)))
     {
         e->accept();
         ncLock.lock();
@@ -4389,12 +4399,16 @@
 
         if (message.left(21) == "RECORDING_LIST_CHANGE")
         {
-            QStringList tokens = QStringList::split(" ", message);
+            QStringList tokens = message.simplified().split(" ");
             if (tokens.size() == 1)
             {
                 fillListFromCache = false;
                 if (!fillListTimer->isActive())
-                    fillListTimer->start(1000, true);
+                {
+                    fillListTimer->stop();
+                    fillListTimer->setSingleShot(true);
+                    fillListTimer->start(1000);
+                }
             }
             else if ((tokens[1] == "DELETE") && (tokens.size() == 4))
             {
@@ -4404,7 +4418,9 @@
                     progCacheLock.unlock();
                     freeSpaceNeedsUpdate = true;
                     fillListFromCache = false;
-                    fillListTimer->start(1000, true);
+                    fillListTimer->stop();
+                    fillListTimer->setSingleShot(true);
+                    fillListTimer->start(1000);
                     return;
                 }
                 vector<ProgramInfo *>::iterator i = progCache->begin();
@@ -4423,13 +4439,15 @@
                 if (!fillListTimer->isActive())
                 {
                     fillListFromCache = true;
-                    fillListTimer->start(1000, true);
+                    fillListTimer->stop();
+                    fillListTimer->setSingleShot(true);
+                    fillListTimer->start(1000);
                 }
             }
         }
         else if (message.left(15) == "NETWORK_CONTROL")
         {
-            QStringList tokens = QStringList::split(" ", message);
+            QStringList tokens = message.simplified().split(" ");
             if ((tokens[1] != "ANSWER") && (tokens[1] != "RESPONSE"))
             {
                 ncLock.lock();
@@ -4438,16 +4456,19 @@
 
                 // This should be an impossible keypress we're simulating
                 QKeyEvent *event;
-                int buttons =
-                        (Qt::MouseButtonMask | Qt::KeyButtonMask);
-
+                Qt::KeyboardModifiers modifiers =
+                    Qt::ShiftModifier |
+                    Qt::ControlModifier |
+                    Qt::AltModifier |
+                    Qt::MetaModifier |
+                    Qt::KeypadModifier;
                 event = new QKeyEvent(QEvent::KeyPress, Qt::Key_LaunchMedia,
-                                      0, buttons);
+                                      modifiers);
                 QApplication::postEvent((QObject*)(gContext->GetMainWindow()),
                                         event);
 
                 event = new QKeyEvent(QEvent::KeyRelease, Qt::Key_LaunchMedia,
-                                      0, buttons);
+                                      modifiers);
                 QApplication::postEvent((QObject*)(gContext->GetMainWindow()),
                                         event);
             }
@@ -4483,7 +4504,7 @@
 
 void PlaybackBox::IncPreviewGeneratorPriority(const QString &xfn)
 {
-    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
+    QString fn = xfn.mid(max(xfn.lastIndexOf('/') + 1,0));
 
     QMutexLocker locker(&previewGeneratorLock);
     vector<QString> &q = previewGeneratorQueue;
@@ -4520,7 +4541,7 @@
  */
 bool PlaybackBox::SetPreviewGenerator(const QString &xfn, PreviewGenerator *g)
 {
-    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
+    QString fn = xfn.mid(max(xfn.lastIndexOf('/') + 1,0));
     QMutexLocker locker(&previewGeneratorLock);
 
     if (!g)
@@ -4562,7 +4583,7 @@
     PreviewMap::const_iterator it;
     QMutexLocker locker(&previewGeneratorLock);
 
-    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
+    QString fn = xfn.mid(max(xfn.lastIndexOf('/') + 1,0));
     if ((it = previewGenerator.find(fn)) == previewGenerator.end())
         return false;
 
@@ -4582,7 +4603,7 @@
 uint PlaybackBox::IncPreviewGeneratorAttempts(const QString &xfn)
 {
     QMutexLocker locker(&previewGeneratorLock);
-    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
+    QString fn = xfn.mid(max(xfn.lastIndexOf('/') + 1,0));
     return previewGenerator[fn].attempts++;
 }
 
@@ -4600,7 +4621,7 @@
 void PlaybackBox::previewReady(const ProgramInfo *pginfo)
 {
     QString xfn = pginfo->pathname + ".png";
-    QString fn = xfn.mid(max(xfn.findRev('/') + 1,0));
+    QString fn = xfn.mid(max(xfn.lastIndexOf('/') + 1,0));
 
     previewGeneratorLock.lock();
     PreviewMap::iterator it = previewGenerator.find(fn);
@@ -4777,7 +4798,16 @@
         QSize previewSize = calc_preview_size(
             blackholeBounds.size(), previewPixmap->size());
         if (previewSize != previewPixmap->size())
-            previewPixmap->resize(previewSize);
+        {
+            QPixmap tmp(previewSize);
+            {
+                QPainter p(&tmp);
+                p.drawPixmap(0,0,*previewPixmap, 0, 0,
+                             min(tmp.width(), previewPixmap->width()),
+                             min(tmp.height(), previewPixmap->height()));
+            }
+            *previewPixmap = tmp;
+        }
         retpixmap = *previewPixmap;
         return retpixmap;
     }
@@ -4818,13 +4848,13 @@
             blackholeBounds.size(), image->size());
 
         if (previewSize == previewPixmap->size())
-            previewPixmap->convertFromImage(*image);
+            *previewPixmap = QPixmap::fromImage(*image);
         else
         {
             QImage tmp2 = image->scaled(previewSize, 
                             Qt::IgnoreAspectRatio,
                             Qt::SmoothTransformation);
-            previewPixmap->convertFromImage(tmp2);
+            *previewPixmap = QPixmap::fromImage(tmp2);
         }
     }
 
@@ -4869,13 +4899,15 @@
     UIImageType *itype;
     bool displayme = false;
 
-    label = new QLabel(tr("Status Icons"), iconhelp, "");
+    label = new QLabel(tr("Status Icons"), iconhelp);
+    label->setObjectName("status_icons");
     QFont font = label->font();
     font.setPointSize(int (font.pointSize() * 1.5));
     font.setBold(true);
     label->setFont(font);
-    label->setBackgroundOrigin(ParentOrigin);
-    label->setPaletteForegroundColor(drawPopupFgColor);
+    QPalette p = label->palette();
+    p.setColor(label->foregroundRole(), drawPopupFgColor);
+    label->setPalette(p);
     label->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
     label->setMinimumWidth((int)(600 * wmult));
     label->setMaximumWidth((int)(600 * wmult));
@@ -4914,26 +4946,35 @@
         if (itype)
         {
             if (curCol == 0)
-                label = new QLabel(it.data(), iconhelp, "nopopsize");
+            {
+                label = new QLabel(*it, iconhelp);
+                label->setObjectName("nopopsize0");
+            }
             else
-                label = new QLabel(it.data(), iconhelp, "");
-            label->setAlignment(Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter);
-            label->setBackgroundOrigin(ParentOrigin);
-            label->setPaletteForegroundColor(drawPopupFgColor);
+            {
+                label = new QLabel(*it, iconhelp);
+                label->setObjectName("nopopsize1");
+            }
+            label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
+            QPalette p = label->palette();
+            p.setColor(label->foregroundRole(), drawPopupFgColor);
+            label->setPalette(p);
             label->setMinimumHeight((int)(50 * hmult));
             label->setMaximumHeight((int)(50 * hmult));
 
             grid->addWidget(label, curRow, curCol + 1, Qt::AlignLeft);
 
-            label = new QLabel(iconhelp, "nopopsize");
+            label = new QLabel(iconhelp);
+            label->setObjectName("nopopsize2");
 
             itype->ResetFilename();
             itype->LoadImage();
             label->setPixmap(itype->GetImage());
             displayme = true;
 
-            label->setBackgroundOrigin(ParentOrigin);
-            label->setPaletteForegroundColor(drawPopupFgColor);
+            p = label->palette();
+            p.setColor(label->foregroundRole(), drawPopupFgColor);
+            label->setPalette(p);
             grid->addWidget(label, curRow, curCol, Qt::AlignCenter);
 
             curCol += 2;
@@ -4968,7 +5009,7 @@
     paintSkipUpdate = false;
     paintSkipCount = 2;
 
-    setActiveWindow();
+    activateWindow();
 }
 
 void PlaybackBox::initRecGroupPopup(QString title, QString name)
@@ -4978,7 +5019,8 @@
 
     recGroupPopup = new MythPopupBox(gContext->GetMainWindow(), true,
                                      drawPopupFgColor, drawPopupBgColor,
-                                     drawPopupSelColor, name);
+                                     drawPopupSelColor,
+                                     name.toLocal8Bit().constData());
 
     QLabel *label = recGroupPopup->addLabel(title, MythPopupBox::Large, false);
     label->setAlignment(Qt::AlignCenter);
@@ -5010,7 +5052,7 @@
 
     previewVideoState = kChanging;
 
-    setActiveWindow();
+    activateWindow();
 
     EmbedTVWindow();
 
@@ -5339,7 +5381,19 @@
         curGroupPassword = "";
 
     if (groupnameAsAllProg)
-        groupDisplayName = tr(recGroup);
+    {
+        if (recGroup == "All Programs")
+            groupDisplayName = tr("All Programs",
+                                  "Recording Group All Programs");
+        else if (recGroup == "Default")
+            groupDisplayName = tr("Default", "Recording Group Default");
+        else if (recGroup == "LiveTV")
+            groupDisplayName = tr("LiveTV", "Recording Group LiveTV");
+        else if (recGroup == "Deleted")
+            groupDisplayName = tr("Deleted", "Recording Group Deleted");
+        else
+            groupDisplayName = recGroup;
+    }
 
     // Don't save anything if we forced a new group
     if (newRecGroup != "")
@@ -5691,7 +5745,7 @@
         return;
 
     recGroupLineEdit->setText(
-        recGroupListBox->currentText().section('[', 0, 0).simplifyWhiteSpace());
+        recGroupListBox->currentText().section('[', 0, 0).simplified());
 }
 
 void PlaybackBox::showRecGroupPasswordChanger(void)
@@ -5707,26 +5761,38 @@
     Q3GridLayout *grid = new Q3GridLayout(3, 2, (int)(10 * wmult));
 
     QLabel *label = new QLabel(tr("Recording Group:"), recGroupPopup);
-    label->setAlignment(Qt::WordBreak | Qt::AlignLeft);
-    label->setBackgroundOrigin(ParentOrigin);
-    label->setPaletteForegroundColor(drawPopupFgColor);
+    label->setAlignment(Qt::AlignLeft);
+    QPalette p = label->palette();
+    p.setColor(label->foregroundRole(), drawPopupFgColor);
+    label->setPalette(p);
     grid->addWidget(label, 0, 0, Qt::AlignLeft);
 
-    if ((recGroup == "Default") || (recGroup == "All Programs") ||
-        (recGroup == "LiveTV") || (recGroup == "Deleted"))
-        label = new QLabel(tr(recGroup), recGroupPopup);
+    QString gdn;
+    if (recGroup == "All Programs")
+        gdn = tr("All Programs",
+                              "Recording Group All Programs");
+    else if (recGroup == "Default")
+        gdn = tr("Default", "Recording Group Default");
+    else if (recGroup == "LiveTV")
+        gdn = tr("LiveTV", "Recording Group LiveTV");
+    else if (recGroup == "Deleted")
+        gdn = tr("Deleted", "Recording Group Deleted");
     else
-        label = new QLabel(recGroup, recGroupPopup);
+        gdn = recGroup;
 
-    label->setAlignment(Qt::WordBreak | Qt::AlignLeft);
-    label->setBackgroundOrigin(ParentOrigin);
-    label->setPaletteForegroundColor(drawPopupFgColor);
+    label = new QLabel(gdn, recGroupPopup);
+
+    label->setAlignment(Qt::AlignLeft);
+    p = label->palette();
+    p.setColor(label->foregroundRole(), drawPopupFgColor);
+    label->setPalette(p);
     grid->addWidget(label, 0, 1, Qt::AlignLeft);
 
     label = new QLabel(tr("Old Password:"), recGroupPopup);
-    label->setAlignment(Qt::WordBreak | Qt::AlignLeft);
-    label->setBackgroundOrigin(ParentOrigin);
-    label->setPaletteForegroundColor(drawPopupFgColor);
+    label->setAlignment(Qt::AlignLeft);
+    p = label->palette();
+    p.setColor(label->foregroundRole(), drawPopupFgColor);
+    label->setPalette(p);
     grid->addWidget(label, 1, 0, Qt::AlignLeft);
 
     recGroupOldPassword = new MythLineEdit(recGroupPopup);
@@ -5735,9 +5801,10 @@
     grid->addWidget(recGroupOldPassword, 1, 1, Qt::AlignLeft);
 
     label = new QLabel(tr("New Password:"), recGroupPopup);
-    label->setAlignment(Qt::WordBreak | Qt::AlignLeft);
-    label->setBackgroundOrigin(ParentOrigin);
-    label->setPaletteForegroundColor(drawPopupFgColor);
+    label->setAlignment(Qt::AlignLeft);
+    p = label->palette();
+    p.setColor(label->foregroundRole(), drawPopupFgColor);
+    label->setPalette(p);
     grid->addWidget(label, 2, 0, Qt::AlignLeft);
 
     recGroupNewPassword = new MythLineEdit(recGroupPopup);
Index: programs/mythfrontend/channelrecpriority.cpp
===================================================================
--- programs/mythfrontend/channelrecpriority.cpp	(revision 18833)
+++ programs/mythfrontend/channelrecpriority.cpp	(working copy)
@@ -236,7 +236,7 @@
 
     for (it = m_channelData.begin(); it != m_channelData.end(); ++it)
     {
-        ChannelInfo *chanInfo = &(it.data());
+        ChannelInfo *chanInfo = &(*it);
         QString key = QString::number(chanInfo->chanid);
 
         // if this channel's recording priority changed from when we entered
@@ -377,7 +377,7 @@
     for (i = 0, pit = m_channelData.begin(); pit != m_channelData.end();
             ++pit, i++)
     {
-        chanInfo = &(pit.data());
+        chanInfo = &(*pit);
         RecPriorityInfo tmp = {chanInfo, i};
         sortingList.push_back(tmp);
     }
Index: programs/mythfrontend/custompriority.cpp
===================================================================
--- programs/mythfrontend/custompriority.cpp	(revision 18833)
+++ programs/mythfrontend/custompriority.cpp	(working copy)
@@ -61,12 +61,10 @@
 
     QString message = tr("Edit Priority Rule") + ": ";
     QLabel *label = new QLabel(message, this);
-    label->setBackgroundOrigin(WindowOrigin);
     label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     hbox->addWidget(label);
 
     m_rule = new MythComboBox( false, this, "rule");
-    m_rule->setBackgroundOrigin(WindowOrigin);
 
     m_rule->insertItem(tr("<New priority rule>"));
     m_recpri   << "1";
@@ -102,12 +100,10 @@
 
     message = tr("Priority Rule Name") + ": ";
     label = new QLabel(message, this);
-    label->setBackgroundOrigin(WindowOrigin);
     label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     hbox->addWidget(label);
 
     m_title = new MythRemoteLineEdit( this, "title" );
-    m_title->setBackgroundOrigin(WindowOrigin);
     hbox->addWidget(m_title);
 
     // Value edit box
@@ -115,20 +111,17 @@
 
     message = tr("Priority Value") + ": ";
     label = new QLabel(message, this);
-    label->setBackgroundOrigin(WindowOrigin);
     label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     hbox->addWidget(label);
 
     m_value = new MythSpinBox( this, "value" );
-    m_value->setMinValue(-99);
-    m_value->setMaxValue(99);
+    m_value->setMinimum(-99);
+    m_value->setMaximum(99);
     m_value->setValue(1);
-    m_value->setBackgroundOrigin(WindowOrigin);
     hbox->addWidget(m_value);
 
     // Example clause combo box
     m_clause = new MythComboBox( false, this, "clause");
-    m_clause->setBackgroundOrigin(WindowOrigin);
 
     m_clause->insertItem(tr("Modify priority for an input (Input priority)"));
     m_csql << "cardinput.cardinputid = 1";
@@ -222,7 +215,6 @@
 
     //  Add Button
     m_addButton = new MythPushButton( this, "add" );
-    m_addButton->setBackgroundOrigin(WindowOrigin);
     m_addButton->setText(addString);
     m_addButton->setEnabled(true);
 
@@ -230,14 +222,12 @@
 
     // Description edit box
     m_description = new MythRemoteLineEdit(5, this, "description" );
-    m_description->setBackgroundOrigin(WindowOrigin);
     vbox->addWidget(m_description);
 
     //  Test Button
     hbox = new Q3HBoxLayout(vbox, (int)(10 * wmult));
 
     m_testButton = new MythPushButton( this, "test" );
-    m_testButton->setBackgroundOrigin(WindowOrigin);
     m_testButton->setText( tr( "Test" ) );
     m_testButton->setEnabled(false);
 
@@ -245,7 +235,6 @@
 
     //  Install Button
     m_installButton = new MythPushButton( this, "install" );
-    m_installButton->setBackgroundOrigin(WindowOrigin);
     m_installButton->setText( tr( "Install" ) );
     m_installButton->setEnabled(false);
 
@@ -253,7 +242,6 @@
 
     //  Delete Button
     m_deleteButton = new MythPushButton( this, "delete" );
-    m_deleteButton->setBackgroundOrigin(WindowOrigin);
     m_deleteButton->setText( tr( "Delete" ) );
     m_deleteButton->setEnabled(false);
 
@@ -261,7 +249,6 @@
 
     //  Cancel Button
     m_cancelButton = new MythPushButton( this, "cancel" );
-    m_cancelButton->setBackgroundOrigin(WindowOrigin);
     m_cancelButton->setText( tr( "Cancel" ) );
     m_cancelButton->setEnabled(true);
 
@@ -287,7 +274,7 @@
 
     if (titlematch >= 0)
     {
-        m_rule->setCurrentItem(titlematch);
+        m_rule->setCurrentIndex(titlematch);
         ruleChanged();
     }
     else if (p->title > "")
@@ -314,7 +301,7 @@
 
 void CustomPriority::ruleChanged(void)
 {
-    int curItem = m_rule->currentItem();
+    int curItem = m_rule->currentIndex();
     if (curItem == prevItem)
         return;
 
@@ -342,7 +329,7 @@
 
 void CustomPriority::clauseChanged(void)
 {
-    QString msg = m_csql[m_clause->currentItem()];
+    QString msg = m_csql[m_clause->currentIndex()];
     msg.replace("\n", " ");
     msg.replace(QRegExp(" [ ]*"), " ");
     msg = QString("%1: \"%2\"").arg(addString).arg(msg);
@@ -361,7 +348,7 @@
     if (m_description->text().contains(QRegExp("\\S")))
         clause = "AND ";
 
-    clause += m_csql[m_clause->currentItem()];
+    clause += m_csql[m_clause->currentIndex()];
     m_description->append(clause);
 }
 
@@ -439,11 +426,11 @@
 
     QString desc = m_description->text();
 
-    if (desc.contains(QRegExp("^\\s*AND\\s", false)))
+    if (desc.contains(QRegExp("^\\s*AND\\s", Qt::CaseInsensitive)))
     {
         msg = "Power Priority rules do not reqiure a leading \"AND\"";
     }
-    else if (desc.contains(";", false))
+    else if (desc.contains(";"))
     {
         msg  = "Power Priority rules can not include semicolon ( ; ) ";
         msg += "statement terminators.";
@@ -455,7 +442,7 @@
                                "oldrecorded) WHERE NULL").arg(desc);
         while (1)
         {
-            int i = qstr.find("RECTABLE");
+            int i = qstr.indexOf("RECTABLE");
             if (i == -1) break;
             qstr = qstr.replace(i, strlen("RECTABLE"), "record");
         }
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
--- programs/mythfrontend/globalsettings.cpp	(revision 18833)
+++ programs/mythfrontend/globalsettings.cpp	(working copy)
@@ -17,6 +17,7 @@
 #include <QCursor>
 #include <QDir>
 #include <QImage>
+#include <QTextCodec>
 
 // MythTV headers
 #include "mythconfig.h"
@@ -56,15 +57,15 @@
 #ifdef USING_OSS
     QDir dev("/dev", "dsp*", QDir::Name, QDir::System);
     gc->fillSelectionsFromDir(dev);
-    dev.setNameFilter("adsp*");
+    dev.setNameFilters(QStringList("adsp*"));
     gc->fillSelectionsFromDir(dev);
 
     dev.setPath("/dev/sound");
     if (dev.exists())
     {
-        dev.setNameFilter("dsp*");
+        dev.setNameFilters(QStringList("dsp*"));
         gc->fillSelectionsFromDir(dev);
-        dev.setNameFilter("adsp*");
+        dev.setNameFilters(QStringList("adsp*"));
         gc->fillSelectionsFromDir(dev);
     }
 #endif
@@ -789,8 +790,8 @@
     {
         while (query.next())
         {
-            QString key = QString::fromUtf8(query.value(0).toString());
-            if (!key.stripWhiteSpace().isEmpty())
+            QString key = query.value(0).toString();
+            if (!key.trimmed().isEmpty())
                 gc->addSelection(key, key);
         }
     }
@@ -953,7 +954,7 @@
     for (uint i = 0; i < 2; i++)
     {
         QString     pcmp  = item.Get(QString("pref_cmp%1").arg(i));
-        QStringList clist = QStringList::split(" ", pcmp);
+        QStringList clist = pcmp.split(" ");
 
         if (clist.size() == 0)
             clist<<((i) ? "" : ">");
@@ -1625,7 +1626,7 @@
     {
         QFileInfo  &theme = *it;
 
-        QFileInfo xml(theme.absFilePath() + "/mainmenu.xml");
+        QFileInfo xml(theme.absoluteFilePath() + "/mainmenu.xml");
 
         if (theme.fileName()[0] != '.' && xml.exists())
             gc->addSelection(theme.fileName());
@@ -1658,7 +1659,7 @@
 static HostComboBox __attribute__ ((unused)) *DecodeVBIFormat()
 {
     QString beVBI = gContext->GetSetting("VbiFormat");
-    QString fmt = beVBI.lower().left(4);
+    QString fmt = beVBI.toLower().left(4);
     int sel = (fmt == "pal ") ? 1 : ((fmt == "ntsc") ? 2 : 0);
 
     HostComboBox *gc = new HostComboBox("DecodeVBIFormat");
@@ -1814,7 +1815,7 @@
     for (uint i = 0; i < (uint) list.size(); i++)
     {
         QString val = QString(list[i]);
-        gc->addSelection(val, val, val.lower() == "utf-8");
+        gc->addSelection(val, val, val.toLower() == "utf-8");
     }
 
     return gc;
@@ -2858,7 +2859,7 @@
         QFileInfo preview;
         QString name;
 
-        ThemeInfo *themeinfo = new ThemeInfo(theme.absFilePath());
+        ThemeInfo *themeinfo = new ThemeInfo(theme.absoluteFilePath());
 
         if (!themeinfo)
             continue;
@@ -2879,7 +2880,7 @@
         {
             VERBOSE(VB_IMPORTANT, QString("Theme %1 missing preview image.")
                                     .arg(theme.fileName()));
-            QString defaultpreview = themes.absPath();
+            QString defaultpreview = themes.absolutePath();
             if (themeinfo->IsWide())
             {
                 defaultpreview += "/default-wide/preview.png";
@@ -2893,7 +2894,7 @@
 
         delete themeinfo;
 
-        QImage* previewImage = new QImage(preview.absFilePath());
+        QImage* previewImage = new QImage(preview.absoluteFilePath());
         if (previewImage->width() == 0 || previewImage->height() == 0)
             VERBOSE(VB_IMPORTANT, QString("Problem reading theme preview image"
                                           " %1").arg(preview.filePath()));
@@ -3434,12 +3435,12 @@
 {
     widget->clearSelections();
     QString q = QString("ISO639Language%1").arg(i);
-    QString lang = gContext->GetSetting(q, "").lower();
+    QString lang = gContext->GetSetting(q, "").toLower();
 
     if ((lang.isEmpty() || lang == "aar") && 
         !gContext->GetSetting("Language", "").isEmpty())
     {
-        lang = iso639_str2_to_str3(GetMythUI()->GetLanguage().lower());
+        lang = iso639_str2_to_str3(GetMythUI()->GetLanguage().toLower());
     }
 
     QMap<int,QString>::iterator it  = _iso639_key_to_english_name.begin();
@@ -3448,7 +3449,7 @@
     for (; it != ite; ++it)
     {
         QString desc = (*it);
-        int idx = desc.find(";");
+        int idx = desc.indexOf(";");
         if (idx > 0)
             desc = desc.left(idx);
 
@@ -3794,8 +3795,8 @@
         QFileInfo  &fi = *it;
 
         struct stat st;
-        QString filepath = fi.absFilePath();
-        int err = lstat(filepath, &st);
+        QString filepath = fi.absoluteFilePath();
+        int err = lstat(filepath.toLocal8Bit().constData(), &st);
 
         if (0 != err)
         {
Index: programs/mythfrontend/main.cpp
===================================================================
--- programs/mythfrontend/main.cpp	(revision 18833)
+++ programs/mythfrontend/main.cpp	(working copy)
@@ -324,7 +324,7 @@
 void TVMenuCallback(void *data, QString &selection)
 {
     (void)data;
-    QString sel = selection.lower();
+    QString sel = selection.toLower();
 
     if (sel.left(9) == "settings ")
     {
@@ -677,7 +677,7 @@
         if (theme.fileName() == "." || theme.fileName() =="..")
             continue;
 
-        QFileInfo xml(theme.absFilePath() + "/theme.xml");
+        QFileInfo xml(theme.absoluteFilePath() + "/theme.xml");
 
         if (!xml.exists())
             continue;
@@ -725,8 +725,10 @@
     pginfo->pathname = mrl;
 
     QDir d(mrl + "/VIDEO_TS");
-    if (mrl.findRev(".iso", -1, false) == (int)mrl.length() - 4 ||
-        mrl.findRev(".img", -1, false) == (int)mrl.length() - 4 ||
+    if (mrl.lastIndexOf(".iso", -1, Qt::CaseInsensitive) ==
+        (int)mrl.length() - 4 ||
+        mrl.lastIndexOf(".img", -1, Qt::CaseInsensitive) ==
+        (int)mrl.length() - 4 ||
         d.exists())
     {
         pginfo->pathname = QString("dvd:%1").arg(mrl);
@@ -801,7 +803,7 @@
     // If we got to this callback, we're back on the menu.  So, send a CTRL-L
     // to cause the menu to reload
     QKeyEvent *event =
-        new QKeyEvent(QEvent::KeyPress, Qt::Key_L, 0, Qt::ControlButton);
+        new QKeyEvent(QEvent::KeyPress, Qt::Key_L, Qt::ControlModifier);
     QApplication::postEvent((QObject*)(gContext->GetMainWindow()), event);
 }
 
@@ -821,7 +823,8 @@
     QString themedir = GetMythUI()->FindThemeDir(themename);
     if (themedir.isEmpty())
     {
-        VERBOSE(VB_IMPORTANT, "Couldn't find theme " + themename);
+        VERBOSE(VB_IMPORTANT, QString("Couldn't find theme '%1'")
+                .arg(themename));
         cleanup();
         exit(FRONTEND_EXIT_NO_THEME);
     }
@@ -987,13 +990,15 @@
 
 int log_rotate(int report_error)
 {
-    int new_logfd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0664);
+    int new_logfd = open(logfile.toLocal8Bit().constData(),
+                         O_WRONLY|O_CREAT|O_APPEND, 0664);
 
     if (new_logfd < 0) {
         /* If we can't open the new logfile, send data to /dev/null */
-        if (report_error) {
-            cerr << "Cannot open logfile "
-                 << logfile.toLocal8Bit().constData() << endl;
+        if (report_error)
+        {
+            VERBOSE(VB_IMPORTANT, QString("Can not open logfile '%1'")
+                    .arg(logfile));
             return -1;
         }
 
@@ -1070,7 +1075,7 @@
 
     bool ResetSettings = false;
 
-    if (binname.lower() != "mythfrontend")
+    if (binname.toLower() != "mythfrontend")
         pluginname = binname;
 
     for (int argpos = 1; argpos < a.argc(); ++argpos)
@@ -1270,8 +1275,8 @@
         for (it = settingsOverride.begin(); it != settingsOverride.end(); ++it)
         {
             VERBOSE(VB_IMPORTANT, QString("Setting '%1' being forced to '%2'")
-                                          .arg(it.key()).arg(it.data()));
-            gContext->OverrideSettingForSession(it.key(), it.data());
+                                          .arg(it.key()).arg(*it));
+            gContext->OverrideSettingForSession(it.key(), *it);
         }
     }
 
@@ -1319,7 +1324,8 @@
     QString themedir = GetMythUI()->FindThemeDir(themename);
     if (themedir.isEmpty())
     {
-        VERBOSE(VB_IMPORTANT, "Couldn't find theme " + themename);
+        VERBOSE(VB_IMPORTANT, QString("Couldn't find theme '%1'")
+                .arg(themename));
         return FRONTEND_EXIT_NO_THEME;
     }
 
@@ -1375,7 +1381,6 @@
         if (pmanager->run_plugin(pluginname) ||
             pmanager->run_plugin("myth" + pluginname))
         {
-            qApp->setMainWidget(mainWindow);
             qApp->exec();
 
             return FRONTEND_EXIT_OK;
@@ -1412,7 +1417,8 @@
         themedir = GetMythUI()->FindThemeDir(themename);
         if (themedir.isEmpty())
         {
-            VERBOSE(VB_IMPORTANT, "Couldn't find theme " + themename);
+            VERBOSE(VB_IMPORTANT, QString("Couldn't find theme '%1'")
+                    .arg(themename));
             return FRONTEND_EXIT_NO_THEME;
         }
 
@@ -1422,7 +1428,6 @@
         // Setup handler for USR1 signals to reload theme
         signal(SIGUSR1, &signal_USR1_handler);
 
-        qApp->setMainWidget(mainWindow);
         qApp->exec();
     } while (!(exitstatus = handleExit()));
 
Index: programs/mythfrontend/viewscheduled.cpp
===================================================================
--- programs/mythfrontend/viewscheduled.cpp	(revision 18833)
+++ programs/mythfrontend/viewscheduled.cpp	(working copy)
@@ -248,7 +248,7 @@
         item->setText(pginfo->ChannelText(m_channelFormat), "channel", state);
 
         temp = pginfo->title;
-        if ((pginfo->subtitle).stripWhiteSpace().length() > 0)
+        if ((pginfo->subtitle).trimmed().length() > 0)
             temp += " - \"" + pginfo->subtitle + "\"";
         item->setText(temp, "title", state); //,font
 
Index: programs/mythfrontend/statusbox.cpp
===================================================================
--- programs/mythfrontend/statusbox.cpp	(revision 18833)
+++ programs/mythfrontend/statusbox.cpp	(working copy)
@@ -137,7 +137,9 @@
     tmp.end();
     m_background = bground;
 
-    setPaletteBackgroundPixmap(m_background);
+    QPalette p = palette();
+    p.setBrush(backgroundRole(), QBrush(m_background));
+    setPalette(p);
 }
 
 void StatusBox::updateContent()
@@ -282,11 +284,11 @@
                 int context;
                 theme->parseContainer(e, name, context, area);
 
-                if (name.lower() == "topbar")
+                if (name.toLower() == "topbar")
                     TopRect = area;
-                if (name.lower() == "selector")
+                if (name.toLower() == "selector")
                     SelectRect = area;
-                if (name.lower() == "content")
+                if (name.toLower() == "content")
                     ContentRect = area;
             }
             else {
@@ -478,7 +480,7 @@
             }
         }
         else if ((currentItem == QObject::tr("Log Entries")) &&
-                 (logNumberKeys.search(action) == 0))
+                 (logNumberKeys.indexIn(action) == 0))
         {
             min_level = action.toInt();
             helptext->SetText(QObject::tr("Setting priority level to %1")
@@ -1169,8 +1171,8 @@
     {
         for (it = jobs.begin(); it != jobs.end(); ++it)
         {
-            QString chanid = it.data().chanid;
-            QDateTime starttime = it.data().starttime;
+            QString chanid = (*it).chanid;
+            QDateTime starttime = (*it).starttime;
             ProgramInfo *pginfo;
 
             pginfo = ProgramInfo::GetProgramFromRecorded(chanid, starttime);
@@ -1181,28 +1183,28 @@
             detail = pginfo->title + "\n" +
                      pginfo->channame + " " + pginfo->chanstr +
                          " @ " + starttime.toString(timeDateFormat) + "\n" +
-                     tr("Job:") + " " + JobQueue::JobText(it.data().type) +
+                     tr("Job:") + " " + JobQueue::JobText((*it).type) +
                      "     " + tr("Status: ") +
-                     JobQueue::StatusText(it.data().status);
+                     JobQueue::StatusText((*it).status);
 
-            if (it.data().status != JOB_QUEUED)
-                detail += " (" + it.data().hostname + ")";
+            if ((*it).status != JOB_QUEUED)
+                detail += " (" + (*it).hostname + ")";
 
-            if (it.data().schedruntime > QDateTime::currentDateTime())
+            if ((*it).schedruntime > QDateTime::currentDateTime())
                 detail += "\n" + tr("Scheduled Run Time:") + " " +
-                    it.data().schedruntime.toString(timeDateFormat);
+                    (*it).schedruntime.toString(timeDateFormat);
             else
-                detail += "\n" + it.data().comment;
+                detail += "\n" + (*it).comment;
 
             contentLines[count] = pginfo->title + " @ " +
                                   starttime.toString(timeDateFormat);
 
             contentDetail[count] = detail;
-            contentData[count] = QString("%1").arg(it.data().id);
+            contentData[count] = QString("%1").arg((*it).id);
 
-            if (it.data().status == JOB_ERRORED)
+            if ((*it).status == JOB_ERRORED)
                 contentFont[count] = "error";
-            else if (it.data().status == JOB_ABORTED)
+            else if ((*it).status == JOB_ABORTED)
                 contentFont[count] = "warning";
 
             count++;
@@ -1285,9 +1287,9 @@
     for (; it != prof2bps.end(); ++it)
     {
         const QString pro =
-                tail.arg(it.key()).arg((int)((float)it.data() / 1024.0));
+                tail.arg(it.key()).arg((int)((float)(*it) / 1024.0));
 
-        long long bytesPerMin = (it.data() >> 1) * 15;
+        long long bytesPerMin = ((*it) >> 1) * 15;
         uint minLeft = ((free<<5)/bytesPerMin)<<5;
         minLeft = (minLeft/15)*15;
         uint hoursLeft = minLeft/60;
@@ -1568,7 +1570,7 @@
             detailString += contentLines[count] + "\n";
             count++;
 
-            QStringList tokens = QStringList::split(",", fsInfos[i].directory);
+            QStringList tokens = fsInfos[i].directory.split(",");
 
             if (tokens.size() > 1)
             {
Index: programs/mythfrontend/mythfrontend.pro
===================================================================
--- programs/mythfrontend/mythfrontend.pro	(revision 18833)
+++ programs/mythfrontend/mythfrontend.pro	(working copy)
@@ -3,6 +3,8 @@
 include ( ../../version.pro )
 include ( ../programs-libs.pro )
 
+QT += network xml sql opengl qt3support
+
 TEMPLATE = app
 CONFIG += thread
 TARGET = mythfrontend
@@ -66,6 +68,3 @@
 using_jack:DEFINES += USING_JACK
 using_oss: DEFINES += USING_OSS
 macx:      DEFINES += USING_COREAUDIO
-
-#The following line was inserted by qt3to4
-QT += network xml  sql opengl qt3support
Index: programs/mythfrontend/programrecpriority.cpp
===================================================================
--- programs/mythfrontend/programrecpriority.cpp	(revision 18833)
+++ programs/mythfrontend/programrecpriority.cpp	(working copy)
@@ -7,13 +7,11 @@
 
 #include <QLayout>
 #include <QPushButton>
-#include <q3buttongroup.h>
 #include <QLabel>
 #include <QCursor>
 #include <QDateTime>
 #include <QApplication>
 #include <QRegExp>
-#include <q3header.h>
 #include <QKeyEvent>
 #include <QPixmap>
 #include <QPaintEvent>
@@ -385,9 +383,9 @@
     int context;
     theme->parseContainer(element, name, context, area);
 
-    if (name.lower() == "selector")
+    if (name.toLower() == "selector")
         listRect = area;
-    if (name.lower() == "program_info")
+    if (name.toLower() == "program_info")
         infoRect = area;
 }
 
@@ -407,7 +405,9 @@
     tmp.end();
     myBackground = bground;
 
-    setPaletteBackgroundPixmap(myBackground);
+    QPalette p = palette();
+    p.setBrush(backgroundRole(), QBrush(myBackground));
+    setPalette(p);
 }
 
 void ProgramRecPriority::paintEvent(QPaintEvent *e)
@@ -578,7 +578,7 @@
                 // the cursor currently is
                 for (cnt = 0, it = programData.begin(); cnt < inList+inData;
                      cnt++, ++it);
-                progInfo = &(it.data());
+                progInfo = &((*it));
 
                 int rtRecPriors[11];
                 rtRecPriors[0] = 0;
@@ -717,7 +717,7 @@
                     // the cursor currently is
                     for (cnt = 0, it = programData.begin(); cnt < inList+inData;
                          cnt++, ++it);
-                    progInfo = &(it.data());
+                    progInfo = &((*it));
                     progInfo->recstatus = inactive ? rsInactive : rsUnknown;
                 } else
                     MythDB::DBError("Update recording schedule inactive query", query);
@@ -768,7 +768,7 @@
     // iterate through programData till we hit the line where
     // the cursor currently is
     for (cnt = 0, it = programData.begin(); cnt < inList+inData; cnt++, ++it);
-    progInfo = &(it.data());
+    progInfo = &((*it));
 
     // inc/dec recording priority
     tempRecPriority = progInfo->recpriority + howMuch;
@@ -789,7 +789,7 @@
 
     for (it = programData.begin(); it != programData.end(); ++it)
     {
-        ProgramRecPriorityInfo *progInfo = &(it.data());
+        ProgramRecPriorityInfo *progInfo = &((*it));
         int key = progInfo->recordid;
 
         // if this program's recording priority changed from when we entered
@@ -882,7 +882,7 @@
             QMap<QString, ProgramRecPriorityInfo>::Iterator it;
             for (it = programData.begin(); it != programData.end(); ++it)
             {
-                ProgramRecPriorityInfo *progInfo = &(it.data());
+                ProgramRecPriorityInfo *progInfo = &((*it));
 
                 if (progInfo->recordid == recordid)
                 {
@@ -1213,10 +1213,10 @@
     // of programData in pdCopy
     for (i = 0, pit = programData.begin(); pit != programData.end(); ++pit, i++)
     {
-        ProgramRecPriorityInfo *progInfo = &(pit.data());
+        ProgramRecPriorityInfo *progInfo = &(*pit);
         RecPriorityInfo tmp = {progInfo, i};
         sortedList.push_back(tmp);
-        pdCopy[pit.key()] = pit.data();
+        pdCopy[pit.key()] = *pit;
     }
 
     // sort sortedList
@@ -1290,7 +1290,7 @@
         for (j = 0,pit = pdCopy.begin(); j != recPriorityInfo->cnt; j++, ++pit);
 
         // put back into programData
-        programData[QString::number(999-i)] = pit.data();
+        programData[QString::number(999-i)] = *pit;
 
         // if recPriorityInfo[i] is the program where the cursor
         // was pre-sort then we need to update to cursor
@@ -1325,7 +1325,7 @@
     QMap<QString, ProgramRecPriorityInfo>::Iterator it;
     for (cnt = 0, it = programData.begin(); cnt < inList+inData;
          cnt++, ++it);
-    programData.remove(it);
+    programData.erase(it);
     SortList();
     delete curitem;
     curitem = NULL;
@@ -1371,7 +1371,7 @@
                 {
                     if (pastSkip <= 0)
                     {
-                        ProgramRecPriorityInfo *progInfo = &(it.data());
+                        ProgramRecPriorityInfo *progInfo = &(*it);
 
                         int progRecPriority = progInfo->recpriority;
                         int finalRecPriority = progRecPriority +
@@ -1382,7 +1382,7 @@
                         if ((progInfo->rectype == kSingleRecord ||
                              progInfo->rectype == kOverrideRecord ||
                              progInfo->rectype == kDontRecord) &&
-                            (progInfo->subtitle).stripWhiteSpace().length() > 0)
+                            (progInfo->subtitle).trimmed().length() > 0)
                             tempSubTitle = tempSubTitle + " - \"" +
                                            progInfo->subtitle + "\"";
 
Index: programs/mythfrontend/playbackbox.h
===================================================================
--- programs/mythfrontend/playbackbox.h	(revision 18833)
+++ programs/mythfrontend/playbackbox.h	(working copy)
@@ -25,7 +25,6 @@
 #include "jobqueue.h"
 #include "tv_play.h"
 
-#include <q3valuelist.h>
 #include <pthread.h>
 
 class QLabel;
@@ -505,7 +504,7 @@
 
     // Network Control Variables //////////////////////////////////////////////
     mutable QMutex      ncLock;
-    Q3ValueList<QString> networkControlCommands;
+    deque<QString>      networkControlCommands;
     bool                underNetworkControl;
     
     TV                  *m_player;
Index: programs/mythfrontend/custompriority.h
===================================================================
--- programs/mythfrontend/custompriority.h	(revision 18833)
+++ programs/mythfrontend/custompriority.h	(working copy)
@@ -1,16 +1,9 @@
 #ifndef CUSTOMPRIORITY_H_
 #define CUSTOMPRIORITY_H_
 
-#include <qdatetime.h>
-#include <q3hbox.h>
-#include <QLabel>
-
 #include "libmyth/mythwidgets.h"
 #include "NuppelVideoPlayer.h"
 
-#include <pthread.h>
-
-class QLabel;
 class ProgramInfo;
 
 class MPUBLIC CustomPriority : public MythDialog
@@ -19,7 +12,7 @@
   public:
 
     CustomPriority(MythMainWindow *parent, const char *name = 0,
-                 ProgramInfo *m_pginfo = NULL);
+                   ProgramInfo *m_pginfo = NULL);
    ~CustomPriority(void);
    
   signals:
Index: programs/mythfrontend/networkcontrol.cpp
===================================================================
--- programs/mythfrontend/networkcontrol.cpp	(revision 18833)
+++ programs/mythfrontend/networkcontrol.cpp	(working copy)
@@ -38,9 +38,9 @@
                       QString const& test, int minchars = 1)
 {
     if (test.length() < minchars)
-        return command.lower() == test.lower();
+        return command.toLower() == test.toLower();
     else
-        return test.lower() == command.left(test.length()).lower();
+        return test.toLower() == command.left(test.length()).toLower();
 }
 
 NetworkControl::NetworkControl()
@@ -104,8 +104,8 @@
     keyMap["end"]                    = Qt::Key_End;
     keyMap["enter"]                  = Qt::Key_Enter;
     keyMap["return"]                 = Qt::Key_Return;
-    keyMap["pageup"]                 = Qt::Key_Prior;
-    keyMap["pagedown"]               = Qt::Key_Next;
+    keyMap["pageup"]                 = Qt::Key_PageUp;
+    keyMap["pagedown"]               = Qt::Key_PageDown;
     keyMap["escape"]                 = Qt::Key_Escape;
     keyMap["tab"]                    = Qt::Key_Tab;
     keyMap["backtab"]                = Qt::Key_Backtab;
@@ -257,7 +257,7 @@
 {
     QMutexLocker locker(&clientLock);
     QString result = "";
-    QStringList tokens = QStringList::split(" ", command);
+    QStringList tokens = command.simplified().split(" ");
 
     if (is_abbrev("jump", tokens[0]))
         result = processJump(tokens);
@@ -269,7 +269,7 @@
         result = processQuery(tokens);
     else if (is_abbrev("help", tokens[0]))
         result = processHelp(tokens);
-    else if ((tokens[0].lower() == "exit") || (tokens[0].lower() == "quit"))
+    else if ((tokens[0].toLower() == "exit") || (tokens[0].toLower() == "quit"))
         QApplication::postEvent(this,
                                 new QEvent((QEvent::Type)kNetworkControlCloseEvent));
     else if (! tokens[0].isEmpty())
@@ -305,7 +305,7 @@
     else
     {
         cs = new QTextStream(s);
-        cs->setEncoding(QTextStream::UnicodeUTF8);
+        cs->setCodec("UTF-8");
     }
     
     if (client)
@@ -359,7 +359,7 @@
         if (lineIn.isEmpty())
             continue;
 
-        tokens = QStringList::split(" ", lineIn);
+        tokens = lineIn.simplified().split(" ");
 
         ncLock.lock();
         networkControlCommands.push_back(lineIn);
@@ -383,7 +383,7 @@
     QTime timer;
     timer.start();
     while ((timer.elapsed() < 2000) &&
-           (gContext->getCurrentLocation().lower() != tokens[1]))
+           (gContext->getCurrentLocation().toLower() != tokens[1]))
         usleep(10000);
 
     return result;
@@ -427,10 +427,10 @@
 
             GetMythUI()->ResetScreensaver();
 
-            event = new QKeyEvent(QEvent::KeyPress, keyCode, 0, Qt::NoButton);
+            event = new QKeyEvent(QEvent::KeyPress, keyCode, Qt::NoModifier);
             QApplication::postEvent(keyDest, event);
 
-            event = new QKeyEvent(QEvent::KeyRelease, keyCode, 0, Qt::NoButton);
+            event = new QKeyEvent(QEvent::KeyRelease, keyCode, Qt::NoModifier);
             QApplication::postEvent(keyDest, event);
         }
         else if (((tokenLen == 1) &&
@@ -441,41 +441,40 @@
             QKeySequence a(tokens[curToken]);
             int keyCode = a[0];
             int ch = tokens[curToken][tokenLen - 1].toAscii();
-            int buttons = Qt::NoButton;
+            Qt::KeyboardModifiers modifiers = Qt::NoModifier;
 
             if (tokenLen > 1)
             {
-                QStringList tokenParts =
-                    QStringList::split("+", tokens[curToken]);
+                QStringList tokenParts = tokens[curToken].split("+");
 
                 int partNum = 0;
                 while (partNum < (tokenParts.size() - 1))
                 {
-                    if (tokenParts[partNum].upper() == "CTRL")
-                        buttons |= Qt::ControlButton;
-                    if (tokenParts[partNum].upper() == "SHIFT")
-                        buttons |= Qt::ShiftButton;
-                    if (tokenParts[partNum].upper() == "ALT")
-                        buttons |= Qt::AltButton;
-                    if (tokenParts[partNum].upper() == "META")
-                        buttons |= Qt::MetaButton;
+                    if (tokenParts[partNum].toUpper() == "CTRL")
+                        modifiers |= Qt::ControlModifier;
+                    if (tokenParts[partNum].toUpper() == "SHIFT")
+                        modifiers |= Qt::ShiftModifier;
+                    if (tokenParts[partNum].toUpper() == "ALT")
+                        modifiers |= Qt::AltModifier;
+                    if (tokenParts[partNum].toUpper() == "META")
+                        modifiers |= Qt::MetaModifier;
 
                     partNum++;
                 }
             }
             else
             {
-                if (tokens[curToken] == tokens[curToken].upper())
-                    buttons = Qt::ShiftButton;
+                if (tokens[curToken] == tokens[curToken].toUpper())
+                    modifiers = Qt::ShiftModifier;
             }
 
             GetMythUI()->ResetScreensaver();
 
-            event = new QKeyEvent(QEvent::KeyPress, keyCode, ch, buttons,
+            event = new QKeyEvent(QEvent::KeyPress, keyCode, ch, modifiers,
                                   tokens[curToken]);
             QApplication::postEvent(keyDest, event);
 
-            event = new QKeyEvent(QEvent::KeyRelease, keyCode, ch, buttons,
+            event = new QKeyEvent(QEvent::KeyRelease, keyCode, ch, modifiers,
                                   tokens[curToken]);
             QApplication::postEvent(keyDest, event);
         }
@@ -537,7 +536,7 @@
 
             QString message = QString("NETWORK_CONTROL %1 PROGRAM %2 %3")
                                       .arg(action).arg(tokens[2])
-                                      .arg(tokens[3].upper());
+                                      .arg(tokens[3].toUpper());
             MythEvent me(message);
             gContext->dispatch(me);
 
@@ -552,7 +551,7 @@
     }
     // Everything below here requires us to be in playback mode so check to
     // see if we are
-    else if (gContext->getCurrentLocation().lower() != "playback")
+    else if (gContext->getCurrentLocation().toLower() != "playback")
     {
         return QString("ERROR: You are in %1 mode and this command is only "
                        "for playback mode")
@@ -612,7 +611,7 @@
             return QString("ERROR: See 'help %1' for usage information")
                            .arg(tokens[0]);
 
-        tokens[2] = tokens[2].lower();
+        tokens[2] = tokens[2].toLower();
         if ((tokens[2].contains(QRegExp("^\\-*\\d+x$"))) ||
             (tokens[2].contains(QRegExp("^\\-*\\d+\\/\\d+x$"))) ||
             (tokens[2].contains(QRegExp("^\\d*\\.\\d+x$"))))
@@ -708,7 +707,7 @@
              (tokens[2].contains(QRegExp("^\\d+$"))) &&
              (tokens[3].contains(QRegExp(
                          "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d$"))))
-        return listRecordings(tokens[2], tokens[3].upper());
+        return listRecordings(tokens[2], tokens[3].toUpper());
     else if (is_abbrev("recordings", tokens[1]))
         return listRecordings();
     else
@@ -748,8 +747,8 @@
 
         for (it = jumpMap.begin(); it != jumpMap.end(); ++it)
         {
-            helpText += it.key().leftJustify(20, ' ', true) + " - " +
-                        it.data() + "\r\n";
+            helpText += it.key().leftJustified(20, ' ', true) + " - " +
+                        *it + "\r\n";
         }
     }
     else if (is_abbrev("key", command))
@@ -858,7 +857,7 @@
         if (message.left(15) != "NETWORK_CONTROL")
             return;
 
-        QStringList tokens = QStringList::split(" ", message);
+        QStringList tokens = message.simplified().split(" ");
         if ((tokens.size() >= 3) &&
             (tokens[1] == "ANSWER"))
         {
@@ -890,7 +889,7 @@
         nrLock.lock();
         replies = networkControlReplies.size();
         while (client && cs && replies > 0 &&
-               client->state() == QTcpSocket::Connected)
+               client->state() == QTcpSocket::ConnectedState)
         {
             reply = networkControlReplies.front();
             networkControlReplies.pop_front();
@@ -906,7 +905,7 @@
     }
     else if (e->type() == kNetworkControlCloseEvent)
     {
-        if (client && client->state() == QTcpSocket::Connected)
+        if (client && client->state() == QTcpSocket::ConnectedState)
         {
             clientLock.lock();
             client->close();
@@ -955,7 +954,7 @@
             result +=
                 QString("%1 %2 %3 %4")
                         .arg(QString::number(query.value(0).toInt())
-                             .rightJustify(5, ' '))
+                             .rightJustified(5, ' '))
                         .arg(query.value(1).toDateTime().toString(Qt::ISODate))
                         .arg(query.value(2).toDateTime().toString(Qt::ISODate))
                         .arg(atitle.constData());
@@ -1048,7 +1047,7 @@
     ProgramInfo *pginfo = NULL;
     if (gotAnswer)
     {
-        QStringList results = QStringList::split(" ", answer);
+        QStringList results = answer.simplified().split(" ");
         pginfo = ProgramInfo::GetProgramFromRecorded(results[5], results[6]);
         if (!pginfo)
             return "ERROR: Unable to find program info for current program";
@@ -1060,7 +1059,7 @@
 
         if (tokens.size() >= 5)
         {
-            QStringList size = QStringList::split("x", tokens[4]);
+            QStringList size = tokens[4].split("x");
             width  = size[0].toInt();
             height = size[1].toInt();
         }