Index: mythtv/programs/mythfrontend/playbackbox.cpp =================================================================== --- mythtv/programs/mythfrontend/playbackbox.cpp (revision 21309) +++ mythtv/programs/mythfrontend/playbackbox.cpp (working copy) @@ -1,6 +1,4 @@ -using namespace std; - #include #include #include Index: mythtv/programs/mythfrontend/viewscheduled.h =================================================================== --- mythtv/programs/mythfrontend/viewscheduled.h (revision 21309) +++ mythtv/programs/mythfrontend/viewscheduled.h (working copy) @@ -1,10 +1,13 @@ #ifndef VIEWSCHEDULED_H_ #define VIEWSCHEDULED_H_ +// QT #include +// libmythtv #include "programlist.h" +// libmythui #include "mythscreentype.h" class TV; Index: mythtv/programs/mythfrontend/statusbox.h =================================================================== --- mythtv/programs/mythfrontend/statusbox.h (revision 21309) +++ mythtv/programs/mythfrontend/statusbox.h (working copy) @@ -1,8 +1,7 @@ #ifndef STATUSBOX_H_ #define STATUSBOX_H_ -#include -using namespace std; +#include // For std::vector #include "mythscreentype.h" @@ -59,7 +58,7 @@ QMap contentData; recprof2bps_t recordingProfilesBPS; - vector m_expList; + std::vector m_expList; MythScreenStack *m_popupStack; Index: mythtv/programs/mythfrontend/guidegrid.cpp =================================================================== --- mythtv/programs/mythfrontend/guidegrid.cpp (revision 21309) +++ mythtv/programs/mythfrontend/guidegrid.cpp (working copy) @@ -1,14 +1,8 @@ -// c/c++ -#include -#include -#include -#include -using namespace std; //qt #include -#include #include +#include // myth #include "mythcontext.h" @@ -278,9 +272,9 @@ fillTimeInfos(); fillChannelInfos(); - int maxchannel = max((int)GetChannelCount() - 1, 0); + int maxchannel = qMax((int)GetChannelCount() - 1, 0); setStartChannel((int)(m_currentStartChannel) - (int)(m_channelCount / 2)); - m_channelCount = min(m_channelCount, maxchannel + 1); + m_channelCount = qMin(m_channelCount, maxchannel + 1); updateChannels(); m_recList.FromScheduler(); @@ -658,7 +652,7 @@ uint si = m_channelInfoIdx[idx]; - vector sel; + std::vector sel; sel.push_back( MKKEY(idx, si) ); const PixmapChannel *ch = GetChannelInfo(sel[0]>>32, sel[0]&0xffff); @@ -734,7 +728,7 @@ DBChanList channels = ChannelUtil::GetChannels(0, true, "", m_changrpid); ChannelUtil::SortChannels(channels, m_channelOrdering, false); - typedef vector uint_list_t; + typedef std::vector uint_list_t; QMap channum_to_index_map; QMap callsign_to_index_map; @@ -988,7 +982,7 @@ ProgramList::iterator program; program = proglist->begin(); - vector unknownlist; + std::vector unknownlist; bool unknown = false; ProgramInfo *proginfo = NULL; for (int x = 0; x < m_timeCount; x++) @@ -1036,7 +1030,7 @@ ts = ts.addSecs(5 * 60); } - vector::iterator it = unknownlist.begin(); + std::vector::iterator it = unknownlist.begin(); for (; it != unknownlist.end(); ++it) proglist->append(*it); @@ -1467,8 +1461,8 @@ int maxchannel = 0; fillChannelInfos(); - maxchannel = max((int)GetChannelCount() - 1, 0); - m_channelCount = min(m_guideGrid->getChannelCount(), maxchannel + 1); + maxchannel = qMax((int)GetChannelCount() - 1, 0); + m_channelCount = qMin(m_guideGrid->getChannelCount(), maxchannel + 1); m_recList.FromScheduler(); fillProgramInfos(); Index: mythtv/programs/mythfrontend/channelrecpriority.cpp =================================================================== --- mythtv/programs/mythfrontend/channelrecpriority.cpp (revision 21309) +++ mythtv/programs/mythfrontend/channelrecpriority.cpp (working copy) @@ -1,8 +1,6 @@ -#include -#include -#include -using namespace std; +#include +#include #include "channelrecpriority.h" #include "tv.h" @@ -361,9 +359,9 @@ } int i, j; - vector sortingList; + QVector sortingList; QMap::iterator pit; - vector::iterator sit; + QVector::iterator sit; ChannelInfo *chanInfo; RecPriorityInfo *recPriorityInfo; @@ -379,12 +377,12 @@ switch(m_sortType) { case byRecPriority: - sort(sortingList.begin(), sortingList.end(), + qSort(sortingList.begin(), sortingList.end(), channelRecPrioritySort()); break; case byChannel: default: - sort(sortingList.begin(), sortingList.end(), + qSort(sortingList.begin(), sortingList.end(), channelSort()); break; } Index: mythtv/programs/mythfrontend/mythappearance.h =================================================================== --- mythtv/programs/mythfrontend/mythappearance.h (revision 21309) +++ mythtv/programs/mythfrontend/mythappearance.h (working copy) @@ -1,8 +1,8 @@ #ifndef MYTHAPPEARANCE_H #define MYTHAPPEARANCE_H -#include -#include +#include +#include #include "mythscreentype.h" #include "mythuitext.h" Index: mythtv/programs/mythfrontend/proglist.h =================================================================== --- mythtv/programs/mythfrontend/proglist.h (revision 21309) +++ mythtv/programs/mythfrontend/proglist.h (working copy) @@ -3,7 +3,6 @@ // Qt headers #include -#include // MythTV headers #include "mythscreentype.h" Index: mythtv/programs/mythfrontend/custompriority.cpp =================================================================== --- mythtv/programs/mythfrontend/custompriority.cpp (revision 21309) +++ mythtv/programs/mythfrontend/custompriority.cpp (working copy) @@ -1,6 +1,3 @@ -#include -#include -using namespace std; #include "custompriority.h" Index: mythtv/programs/mythfrontend/progfind.h =================================================================== --- mythtv/programs/mythfrontend/progfind.h (revision 21309) +++ mythtv/programs/mythfrontend/progfind.h (working copy) @@ -4,8 +4,6 @@ // qt #include #include -#include -#include // myth #include "mythscreentype.h" Index: mythtv/programs/mythfrontend/mythfexml.h =================================================================== --- mythtv/programs/mythfrontend/mythfexml.h (revision 21309) +++ mythtv/programs/mythfrontend/mythfexml.h (working copy) @@ -8,8 +8,7 @@ #ifndef MYTHFEXML_H_ #define MYTHFEXML_H_ -#include -#include +#include #include "upnp.h" #include "eventing.h" Index: mythtv/programs/mythfrontend/manualschedule.cpp =================================================================== --- mythtv/programs/mythfrontend/manualschedule.cpp (revision 21309) +++ mythtv/programs/mythfrontend/manualschedule.cpp (working copy) @@ -1,8 +1,4 @@ -#include -#include -using namespace std; - #include #include "manualschedule.h" Index: mythtv/programs/mythfrontend/viewscheduled.cpp =================================================================== --- mythtv/programs/mythfrontend/viewscheduled.cpp (revision 21309) +++ mythtv/programs/mythfrontend/viewscheduled.cpp (working copy) @@ -1,22 +1,21 @@ -#include -#include -using namespace std; - -#include -#include - #include "viewscheduled.h" + +// Libmythtv #include "scheduledrecording.h" #include "customedit.h" #include "programinfo.h" #include "proglist.h" #include "tv_play.h" -#include "mythcontext.h" +// Libmythdb #include "mythverbose.h" + +// Libmyth +#include "mythcontext.h" #include "remoteutil.h" +// Libmythui #include "mythuitext.h" #include "mythuistatetype.h" #include "mythuibuttonlist.h" Index: mythtv/programs/mythfrontend/statusbox.cpp =================================================================== --- mythtv/programs/mythfrontend/statusbox.cpp (revision 21309) +++ mythtv/programs/mythfrontend/statusbox.cpp (working copy) @@ -1,12 +1,6 @@ #include "statusbox.h" -#include -#include - -#include -using namespace std; - #include #include @@ -1198,7 +1192,7 @@ // get free disk space QString hostnames; - vector fsInfos = RemoteGetFreeSpace(); + std::vector fsInfos = RemoteGetFreeSpace(); for (uint i=0; i::iterator it; + std::vector::iterator it; for (it = m_expList.begin(); it != m_expList.end(); it++) delete *it; m_expList.clear(); Index: mythtv/programs/mythfrontend/programrecpriority.cpp =================================================================== --- mythtv/programs/mythfrontend/programrecpriority.cpp (revision 21309) +++ mythtv/programs/mythfrontend/programrecpriority.cpp (working copy) @@ -1,7 +1,5 @@ -#include #include -using namespace std; #include #include @@ -1015,7 +1013,7 @@ void ProgramRecPriority::FillList(void) { int cnt = 999, rtRecPriors[11]; - vector recordinglist; + std::vector recordinglist; int autopriority = gContext->GetNumSetting("AutoRecPriority", 0); @@ -1024,7 +1022,7 @@ RemoteGetAllScheduledRecordings(recordinglist); - vector::reverse_iterator pgiter = recordinglist.rbegin(); + std::vector::reverse_iterator pgiter = recordinglist.rbegin(); for (; pgiter != recordinglist.rend(); pgiter++) { @@ -1174,9 +1172,9 @@ m_currentItem = qVariantValue(item->GetData()); int i, j; - vector sortingList; + std::vector sortingList; QMap::Iterator pit; - vector::iterator sit; + std::vector::iterator sit; RecPriorityInfo *recPriorityInfo; // copy m_programData into sortingList and make a copy Index: mythtv/programs/mythfrontend/proglist.cpp =================================================================== --- mythtv/programs/mythfrontend/proglist.cpp (revision 21309) +++ mythtv/programs/mythfrontend/proglist.cpp (working copy) @@ -1,12 +1,8 @@ -#include -#include -#include -#include -using namespace std; // qt #include #include +#include // myth #include "mythcontext.h" @@ -15,13 +11,12 @@ #include "proglist.h" #include "scheduledrecording.h" #include "customedit.h" -#include "remoteutil.h" #include "channelutil.h" // mythdb -#include "libmythdb/mythdb.h" -#include "libmythdb/mythdbcon.h" -#include "libmythdb/mythverbose.h" +#include "mythdb.h" +#include "mythdbcon.h" +#include "mythverbose.h" // mythui #include "mythuitext.h" @@ -1369,7 +1364,7 @@ } ProgramInfo *s; - vector sortedList; + QVector sortedList; const QRegExp prefixes("^(The |A |An )"); while (!m_itemList.empty()) @@ -1387,14 +1382,14 @@ if (m_type == plNewListings || m_titleSort) { if (m_type == plPreviouslyRecorded) - sort(sortedList.begin(), sortedList.end(), plPrevTitleSort()); + qSort(sortedList.begin(), sortedList.end(), plPrevTitleSort()); else { // Prune to one per title - sort(sortedList.begin(), sortedList.end(), plTitleSort()); + qSort(sortedList.begin(), sortedList.end(), plTitleSort()); QString curtitle = ""; - vector::iterator i = sortedList.begin(); + QVector::iterator i = sortedList.begin(); while (i != sortedList.end()) { ProgramInfo *p = *i; @@ -1417,13 +1412,13 @@ if (m_reverseSort) { - vector::reverse_iterator r = sortedList.rbegin(); - for (; r != sortedList.rend(); r++) + QVector::iterator r = sortedList.end() - 1; + for (; r != sortedList.begin() - 1; r--) m_itemList.append(*r); } else { - vector::iterator i = sortedList.begin(); + QVector::iterator i = sortedList.begin(); for (; i != sortedList.end(); i++) m_itemList.append(*i); } Index: mythtv/programs/mythfrontend/mythcontrols.cpp =================================================================== --- mythtv/programs/mythfrontend/mythcontrols.cpp (revision 21309) +++ mythtv/programs/mythfrontend/mythcontrols.cpp (working copy) @@ -29,7 +29,6 @@ // Qt headers #include #include -#include // MythTV headers #include @@ -39,7 +38,6 @@ #include #include #include -#include #include // MythControls headers Index: mythtv/programs/mythfrontend/progfind.cpp =================================================================== --- mythtv/programs/mythfrontend/progfind.cpp (revision 21309) +++ mythtv/programs/mythfrontend/progfind.cpp (working copy) @@ -1,8 +1,4 @@ -#include -#include -#include - // qt #include #include @@ -30,9 +26,6 @@ #include "progfind.h" -using namespace std; - - #define LOC QString("ProgFinder: ") #define LOC_ERR QString("ProgFinder, Error: ") #define LOC_WARN QString("ProgFinder, Warning: ") Index: mythtv/programs/mythfrontend/guidegrid.h =================================================================== --- mythtv/programs/mythfrontend/guidegrid.h (revision 21309) +++ mythtv/programs/mythfrontend/guidegrid.h (working copy) @@ -3,7 +3,7 @@ #define GUIDEGRID_H_ // c++ -#include +#include // For std::vector // qt #include @@ -17,8 +17,6 @@ #include "channelgroup.h" #include "channelutil.h" -using namespace std; - class ProgramInfo; class TV; class QTimer; @@ -28,8 +26,8 @@ #define MAX_DISPLAY_CHANS 12 #define MAX_DISPLAY_TIMES 36 -typedef vector pix_chan_list_t; -typedef vector pix_chan_list_list_t; +typedef std::vector pix_chan_list_t; +typedef std::vector pix_chan_list_list_t; class JumpToChannel; class MPUBLIC JumpToChannelListener Index: mythtv/programs/mythfrontend/mediarenderer.h =================================================================== --- mythtv/programs/mythfrontend/mediarenderer.h (revision 21309) +++ mythtv/programs/mythfrontend/mediarenderer.h (working copy) @@ -11,8 +11,8 @@ #ifndef __MEDIARENDERER_H__ #define __MEDIARENDERER_H__ -#include -#include +#include +#include #include "upnp.h" #include "upnpcmgr.h" Index: mythtv/programs/mythfrontend/exitprompt.cpp =================================================================== --- mythtv/programs/mythfrontend/exitprompt.cpp (revision 21309) +++ mythtv/programs/mythfrontend/exitprompt.cpp (working copy) @@ -1,4 +1,3 @@ -#include // for system() #include Index: mythtv/programs/mythfrontend/mythfexml.cpp =================================================================== --- mythtv/programs/mythfrontend/mythfexml.cpp (revision 21309) +++ mythtv/programs/mythfrontend/mythfexml.cpp (working copy) @@ -7,18 +7,19 @@ #include "mythfexml.h" +//#include + #include "mythcontext.h" #include "util.h" #include "mythdbcon.h" #include "mythmainwindow.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "../../config.h" @@ -54,7 +55,7 @@ MythFEXMLMethod MythFEXML::GetMethod( const QString &sURI ) { - if (sURI == "GetScreenShot" ) return MFEXML_GetScreenShot; + if (sURI == "GetScreenShot") return MFEXML_GetScreenShot; return( MFEXML_Unknown ); } @@ -73,12 +74,12 @@ return( false ); VERBOSE(VB_UPNP, QString("MythFEXML::ProcessRequest: %1 : %2") - .arg(pRequest->m_sMethod) - .arg(pRequest->m_sRawRequest)); + .arg(pRequest->m_sMethod) + .arg(pRequest->m_sRawRequest)); switch( GetMethod( pRequest->m_sMethod )) { - case MFEXML_GetScreenShot : GetScreenShot ( pRequest ); return true; + case MFEXML_GetScreenShot : GetScreenShot ( pRequest ); return true; default: @@ -123,7 +124,7 @@ if (!gContext->GetMainWindow()->screenShot(sFileName,nWidth, nHeight)) { VERBOSE(VB_GENERAL, "MythFEXML: Failed to take screenshot. Aborting"); - return; + return; } pRequest->m_sFileName = sFileName; Index: mythtv/programs/mythfrontend/action.cpp =================================================================== --- mythtv/programs/mythfrontend/action.cpp (revision 21309) +++ mythtv/programs/mythfrontend/action.cpp (working copy) @@ -23,7 +23,7 @@ */ // Qt headers -#include +#include // MythControls headers #include "action.h" Index: mythtv/programs/mythfrontend/mythosdmenueditor.cpp =================================================================== --- mythtv/programs/mythfrontend/mythosdmenueditor.cpp (revision 21309) +++ mythtv/programs/mythfrontend/mythosdmenueditor.cpp (working copy) @@ -1,28 +1,16 @@ #define MYTHOSDMENUEDITOR_CPP /* QT includes */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include /* MythTV includes */ #include "mythcontext.h" -#include "mythdbcon.h" -#include "mythmainwindow.h" -#include "myththemebase.h" #include "mythuibuttonlist.h" #include "mythuibutton.h" #include "mythosdmenueditor.h" #include "tvosdmenuentry.h" -using namespace std; - /* Static data members */ TVState MythOSDMenuEditor::WatchingLiveTV = kState_WatchingLiveTV; TVState MythOSDMenuEditor::WatchingPreRecorded = kState_WatchingPreRecorded;