diff options
Diffstat (limited to 'krename/datetime.cpp')
-rw-r--r-- | krename/datetime.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/krename/datetime.cpp b/krename/datetime.cpp index 46f8aa3..83476de 100644 --- a/krename/datetime.cpp +++ b/krename/datetime.cpp @@ -126,7 +126,7 @@ void MyDatePlugin::drawInterface( TQWidget* w, TQVBoxLayout* l ) void MyDatePlugin::fillStructure() { #ifndef BENNY - dvals.date = kDate->getDate(); + dvals.date = kDate->date(); dvals.changeModification = checkModification->isChecked(); dvals.changeAccess = checkAccess->isChecked(); dvals.hour = spinHour->value(); @@ -149,7 +149,7 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) f = fopen((const char *)filename, "r"); if( f == NULL ) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + return i18n("Can't change date of file %1.").arg(filename); fclose( f ); @@ -165,16 +165,16 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) ti = mktime( &tmp ); if( ti == -1 ) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + return i18n("Can't change date of file %1.").arg(filename); if( stat( (const char *)filename, &st ) == -1 ) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + return i18n("Can't change date of file %1.").arg(filename); t->actime = st.st_atime; t->modtime = ti; if(utime( (const char *)filename, t ) != 0) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + return i18n("Can't change date of file %1.").arg(filename); return TQString(); #else @@ -187,9 +187,9 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) time_t ti; - f = fopen((const char *)filename, "r"); + f = fopen(filename.local8Bit(), "r"); if( f == NULL ) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + return i18n("Can't change date of file %1.").arg(filename); fclose( f ); @@ -204,10 +204,10 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) ti = mktime( &tmp ); if( ti == -1 ) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + return i18n("Can't change date of file %1.").arg(filename); - if( stat( (const char *)filename, &st ) == -1 ) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + if (stat(filename.local8Bit(), &st) == -1) + return i18n("Can't change date of file %1.").arg(filename); if(dvals.changeAccess) t->actime = ti; @@ -219,8 +219,8 @@ TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int ) else t->modtime = st.st_mtime; - if(utime( (const char *)filename, t ) != 0) - return TQString( i18n("Can't change date of file %1.") ).arg(filename); + if (utime(filename.local8Bit(), t) != 0) + return i18n("Can't change date of file %1.").arg(filename); return TQString(); #endif |