[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-2/kimdaba
From: Jesper Pedersen <blackie () blackie ! dk>
Date: 2005-04-23 9:34:14
Message-ID: 20050423093414.70CD9492 () office ! kde ! org
[Download RAW message or body]
CVS commit by blackie:
handle file name encoding better - I hope
M +1 -1 export.cpp 1.31
M +1 -1 htmlexportdialog.cpp 1.58
M +6 -4 options.cpp 1.89
M +143 -143 util.cpp 1.55
--- kdeextragear-2/kimdaba/export.cpp #1.30:1.31
@@ -308,5 +308,5 @@ void Export::pixmapLoaded( const QString
QBuffer buffer( data );
buffer.open( IO_WriteOnly );
- image.save( &buffer, KImageIO::type( zipFileName ).latin1() );
+ image.save( &buffer, QFile::encodeName( KImageIO::type( zipFileName ) ) );
if ( _location == Inline || !_copyingFiles )
--- kdeextragear-2/kimdaba/htmlexportdialog.cpp #1.57:1.58
@@ -777,5 +777,5 @@ bool HTMLExportDialog::linkIndexFile()
.arg((*it)->text(true));
QString destFile = _tempDir + QString::fromLatin1("/index.html");
- bool ok = ( symlink( fromFile.latin1(), destFile.latin1() ) == 0 );
+ bool ok = ( symlink( QFile::encodeName(fromFile), \
QFile::encodeName(destFile) ) == 0 ); if ( !ok ) {
KMessageBox::error( this, i18n("<qt>Unable to make a symlink from %1 \
to %2</qt>")
--- kdeextragear-2/kimdaba/options.cpp #1.88:1.89
@@ -75,9 +75,11 @@ Options::Options( const QDomElement& con
_albumCategory = config.attribute( QString::fromLatin1( "albumCategory" ) );
_viewSortType = (ViewSortType) config.attribute( QString::fromLatin1( \
"viewSortType" ) ).toInt(); + if ( config.hasAttribute( QString::fromLatin1( \
"fromDate" ) ) )
_fromDate = QDate::fromString( config.attribute( QString::fromLatin1( "fromDate" \
) ), ISODate );
- if (! _fromDate.isValid() )
+ else
_fromDate = QDate( QDate::currentDate().year(), 1, 1 );
+ if ( config.hasAttribute( QString::fromLatin1( "toDate" ) ) )
_toDate = QDate::fromString( config.attribute( QString::fromLatin1( "toDate" ) \
), ISODate );
- if (! _toDate.isValid() )
+ else
_toDate = QDate( QDate::currentDate().year()+1, 1, 1 );
_launchViewerFullScreen = (bool) config.attribute( QString::fromLatin1( \
"launchViewerFullScreen" ) ).toInt();
--- kdeextragear-2/kimdaba/util.cpp #1.54:1.55
@@ -1,18 +1,18 @@
/* Copyright (C) 2003-2005 Jesper K. Pedersen <blackie@kde.org>
- 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 of the License, or (at your option) any later version.
+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 of the License, 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.
+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.
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
*/
@@ -433,5 +433,5 @@ extern "C"
bool Util::loadJPEG(QImage *img, const QString& imageFile, QSize* fullSize, int \
width, int height) {
- FILE* inputFile=fopen(imageFile.latin1(), "rb");
+ FILE* inputFile=fopen( QFile::encodeName(imageFile), "rb");
if(!inputFile)
return false;
@@ -542,5 +542,5 @@ bool Util::loadCRW(QImage *img, const QS
Steffen Hansen <hansen@kde.org>
*/
- FILE* inputFile=fopen(imageFile.latin1(), "rb");
+ FILE* inputFile=fopen( QFile::encodeName(imageFile), "rb");
if(!inputFile)
return false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic