[mythtv-commits] Ticket #8018: Screenshot Filename Date is Incorrect
MythTV
mythtv at cvs.mythtv.org
Wed Feb 3 02:21:18 UTC 2010
#8018: Screenshot Filename Date is Incorrect
---------------------------------------------+------------------------------
Reporter: Scott.Atkins@… | Owner: stuartm
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - User Interface Library | Version: 0.22
Severity: medium | Mlocked: 0
---------------------------------------------+------------------------------
The current month is not included in the file name, but the minute is
included twice. The code in question is:
bool MythMainWindow::screenShot(int x, int y, int x2, int y2)
{
QString fPath = GetMythDB()->GetSetting("ScreenShotPath","/tmp/");
QString fName = QString("/%1/myth-screenshot-%2.png")
.arg(fPath)
.arg(QDateTime::currentDateTime()
.toString("yyyy-mm-ddThh-mm-ss.zzz"));
return screenShot(fName, x, y, x2, y2, 0, 0);
}
Note the toString has mm twice. Looking up QDateTime, month should be MM.
Meaning the code should be:
bool MythMainWindow::screenShot(int x, int y, int x2, int y2)
{
QString fPath = GetMythDB()->GetSetting("ScreenShotPath","/tmp/");
QString fName = QString("/%1/myth-screenshot-%2.png")
.arg(fPath)
.arg(QDateTime::currentDateTime()
.toString("yyyy-MM-ddThh-mm-ss.zzz"));
return screenShot(fName, x, y, x2, y2, 0, 0);
}
This code starts at line 735 of mythmainwindow.cpp as of changeset 23069.
Yes it is a minor thing, but makes a big difference in trying to find all
screen shots on the same day.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/8018>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list