Ticket #2013: channel_zeros_prefix.patch
File channel_zeros_prefix.patch, 2.1 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/tv_play.h
464 464 mutable QString queuedChanNum; 465 465 /// Queued ChanID (from EPG channel selector) 466 466 uint queuedChanID; 467 /// Used to strip unwanted characters from queuedChanNum468 QRegExp queuedChanNumExpr;469 467 /// Lock used so that input QStrings can be used across threads, and so 470 468 /// that queuedChanNumExpr can be used safely in Qt 3.2 and earlier. 471 469 mutable QMutex queuedInputLock; -
libs/libmythtv/tv_play.cpp
306 306 asInputMode(false), asInputModeExpires(QTime::currentTime()), 307 307 // Channel changing state variables 308 308 queuedChanNum(""), 309 queuedChanNumExpr(QRegExp("([1-9]|\\w)")),310 309 muteTimer(new QTimer(this)), 311 310 lockTimerOn(false), 312 311 // previous channel functionality state variables … … 335 334 // Window info (GUI is optional, transcoding, preview img, etc) 336 335 myWindow(NULL), embedWinID(0), embedBounds(0,0,0,0) 337 336 { 338 queuedChanNumExpr.setMinimal(true); // we don't need greedy matching339 340 337 for (uint i = 0; i < 2; i++) 341 338 { 342 339 pseudoLiveTVRec[i] = NULL; … … 3896 3893 if (!queuedChanNum.isEmpty()) 3897 3894 { 3898 3895 // strip initial zeros. 3899 int nzi = queuedChanNum.find(queuedChanNumExpr); 3900 if (nzi > 0) 3901 queuedChanNum = queuedChanNum.right(queuedChanNum.length() - nzi); 3896 while (queuedChanNum.startsWith("0")) 3897 queuedChanNum = queuedChanNum.right(queuedChanNum.length() - 1); 3902 3898 queuedChanNum.stripWhiteSpace(); 3903 3899 } 3904 3900 … … 4066 4062 !pseudoLiveTVState[(activenvp == nvp) ? 0 : 1]) 4067 4063 { 4068 4064 QString channum = GetQueuedChanNum(); 4069 QString chaninput = GetQueuedInput();4070 4065 if (browsemode) 4071 4066 { 4072 4067 commited = true;