[Kde-imaging] [Bug 138880] digikam 0.9rc2 - 0.9.1rc1 setting file date to exif doesn't work
Gilles Caulier
caulier.gilles at gmail.com
Fri Jun 8 22:40:41 CEST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=138880
caulier.gilles gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From caulier.gilles gmail com 2007-06-08 22:40 -------
SVN commit 673045 by cgilles:
kipi-plugins from KDE3 branch : Time Adjust plugin : fix modification and access file date accordinly to setting of tool.
BUG: 138880
M +10 -9 plugin_timeadjust.cpp
M +10 -9 plugin_timeadjust.h
M +18 -25 timeadjustdialog.cpp
M +10 -9 timeadjustdialog.h
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/plugin_timeadjust.cpp #673044:673045
@ -1,23 +1,24 @
/* ============================================================
- * Authors: Jesper K. Pedersen <blackie kde org>
- * Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date : 2004-05-16
+ *
+ * This file is a part of kipi-plugins project
+ * http://www.kipi-plugins.org
+ *
+ * Date : 2004-05-16
* Description : a plugin to set time stamp of picture files.
*
- * Copyright 2003-2005 by Jesper Pedersen <blackie kde org>
- * Copyright 2006 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2003-2005 by Jesper Pedersen <blackie kde org>
+ * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
+ * either version 2, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* ============================================================ */
// KDE includes.
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/plugin_timeadjust.h #673044:673045
@ -1,23 +1,24 @
/* ============================================================
- * Authors: Jesper K. Pedersen <blackie kde org>
- * Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date : 2004-05-16
+ *
+ * This file is a part of kipi-plugins project
+ * http://www.kipi-plugins.org
+ *
+ * Date : 2004-05-16
* Description : a plugin to set time stamp of picture files.
*
- * Copyright 2003-2005 by Jesper Pedersen <blackie kde org>
- * Copyright 2006 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2003-2005 by Jesper Pedersen <blackie kde org>
+ * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
+ * either version 2, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* ============================================================ */
#ifndef PLUGIN_TIMEADJUST_H
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/timeadjustdialog.cpp #673044:673045
@ -1,25 +1,11 @
-/* ============================================================
- * Authors: Jesper K. Pedersen <blackie kde org>
- * Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date : 2004-05-16
- * Description : a plugin to set time stamp of picture files.
- *
- * Copyright 2003-2005 by Jesper Pedersen <blackie kde org>
- * Copyright 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
+7
+// C Ansi includes.
+extern "C"
+{
+#include <utime.h>
+}
+
// Qt includes.
#include <qlayout.h>
@ -30,6 +16,7 @
#include <qhbox.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
+#include <qfile.h>
#include <qspinbox.h>
#include <qgrid.h>
#include <qpushbutton.h>
@ -148,11 +135,11 @
"(c) 2003-2005, Jesper K. Pedersen\n"
"(c) 2006, Gilles Caulier");
- d->about->addAuthor("Jesper K. Pedersen", I18N_NOOP("Author and maintainer"),
- "blackie kde org");
+ d->about->addAuthor("Jesper K. Pedersen", I18N_NOOP("Author"),
+ "blackie kde org");
- d->about->addAuthor("Gilles Caulier", I18N_NOOP("Developper"),
- "caulier dot gilles at gmail dot com");
+ d->about->addAuthor("Gilles Caulier", I18N_NOOP("Developper and maintainer"),
+ "caulier dot gilles at gmail dot com");
QPushButton *helpButton = actionButton(Help);
KHelpMenu* helpMenu = new KHelpMenu(this, d->about, false);
@ -434,6 +421,12 @
dateTime = updateTime(info.path(), info.time());
info.setTime(dateTime);
+ // See B.K.O #138880: set the file acess and modification time.
+ struct utimbuf ut;
+ ut.modtime = dateTime.toTime_t();
+ ut.actime = dateTime.toTime_t();
+ ::utime(QFile::encodeName(url.path()), &ut);
+
if (!d->exif->isChecked())
{
if (d->syncEXIFDateCheck->isChecked() || d->syncIPTCDateCheck->isChecked())
--- branches/extragear/kde3/libs/kipi-plugins/timeadjust/timeadjustdialog.h #673044:673045
@ -1,23 +1,24 @
/* ============================================================
- * Authors: Jesper K. Pedersen <blackie kde org>
- * Gilles Caulier <caulier dot gilles at gmail dot com>
- * Date : 2004-05-16
+ *
+ * This file is a part of kipi-plugins project
+ * http://www.kipi-plugins.org
+ *
+ * Date : 2004-05-16
* Description : a plugin to set time stamp of picture files.
*
- * Copyright 2003-2005 by Jesper Pedersen <blackie kde org>
- * Copyright 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2003-2005 by Jesper Pedersen <blackie kde org>
+ * Copyright (C) 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
+ * either version 2, or (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* ============================================================ */
#ifndef TIMEADJUSTDIALOG_H
More information about the Kde-imaging
mailing list