[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeutils/ark
From: Rolf Eike Beer <kde () opensource ! sf-tec ! de>
Date: 2007-01-22 11:55:55
Message-ID: 1169466955.285998.17404.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 626174 by dakon:
Remove most deprecated function calls from Ark
M +2 -2 archive.cpp
M +1 -1 archiveformatdlg.cpp
M +5 -5 archiveformatinfo.cpp
M +2 -2 arkapp.cpp
M +7 -7 arkwidget.cpp
M +3 -3 compressedfile.cpp
M +1 -1 extractiondialog.cpp
M +6 -2 filelistview.cpp
M +3 -2 mainwindow.cpp
M +2 -2 rar.cpp
--- trunk/KDE/kdeutils/ark/archive.cpp #626173:626174
@@ -272,7 +272,7 @@
{
processLine( m_buffer );
}
- else if ( m_buffer.find( m_headerString ) == -1 )
+ else if ( m_buffer.indexOf( m_headerString ) == -1 )
{
if ( m_header_removed && !m_finished )
{
@@ -313,7 +313,7 @@
{
ArchColumns *curCol = *col;
- strpos = curCol->pattern.search( line, pos );
+ strpos = curCol->pattern.indexIn( line, pos );
len = curCol->pattern.matchedLength();
if ( ( strpos == -1 ) || ( len > curCol->maxLength ) )
--- trunk/KDE/kdeutils/ark/archiveformatdlg.cpp #626173:626174
@@ -59,7 +59,7 @@
QStringList list = ArchiveFormatInfo::self()->allDescriptions();
list.sort();
m_combo->addItems( list );
- m_combo->setCurrentIndex( list.findIndex( defaultDescription ) );
+ m_combo->setCurrentIndex( list.indexOf( defaultDescription ) );
}
QString ArchiveFormatDlg::mimeType()
--- trunk/KDE/kdeutils/ark/archiveformatinfo.cpp #626173:626174
@@ -173,7 +173,7 @@
InfoList::Iterator it = m_formatInfos.begin();
for( ; it != m_formatInfos.end(); ++it )
{
- int index = (*it).mimeTypes.findIndex( mimeType );
+ int index = (*it).mimeTypes.indexOf( mimeType );
if( index != -1 )
return (*it).type;
}
@@ -219,7 +219,7 @@
char buffer[ 0x200 ];
dev->open( QIODevice::ReadOnly );
- Q_LONG n = dev->readBlock( buffer, 0x200 );
+ Q_LONG n = dev->read( buffer, 0x200 );
delete dev;
if ( n == 0x200 && buffer[0] != 0 && !strncmp(buffer + 257, "ustar", 5) )
@@ -239,7 +239,7 @@
int index;
for( ; it != m_formatInfos.end(); ++it )
{
- index = (*it).allDescriptions.findIndex( description );
+ index = (*it).allDescriptions.indexOf( description );
if ( index != -1 )
return ( (*it).mimeTypes.at( index ) );
}
@@ -252,7 +252,7 @@
int index;
for( ; it != m_formatInfos.end(); ++it )
{
- index = (*it).mimeTypes.findIndex( mimeType );
+ index = (*it).mimeTypes.indexOf( mimeType );
if ( index != -1 )
return ( (*it).allDescriptions.at( index ) );
}
@@ -265,7 +265,7 @@
int index;
for( ; it != m_formatInfos.end(); ++it )
{
- index = (*it).mimeTypes.findIndex( mimeType );
+ index = (*it).mimeTypes.indexOf( mimeType );
if ( index != -1 )
return ( (*it).defaultExtensions.at( index ) );
}
--- trunk/KDE/kdeutils/ark/arkapp.cpp #626173:626174
@@ -256,7 +256,7 @@
else
realName = _arkname.prettyUrl();
kDebug(1601) << "Removing name " << _arkname.prettyUrl() << endl;
- openArksList.remove(realName);
+ openArksList.removeAll(realName);
m_windowsHash.remove(realName);
}
@@ -287,7 +287,7 @@
realName = resolveFilename(_arkname.path()); // follow symlink
else
realName = _arkname.prettyUrl();
- return ( openArksList.findIndex(realName) != -1 );
+ return ( openArksList.indexOf(realName) != -1 );
}
#include "arkapp.moc"
--- trunk/KDE/kdeutils/ark/arkwidget.cpp #626173:626174
@@ -335,8 +335,8 @@
}
QDir dir( m_convert_tmpDir->name() );
QStringList entries = dir.entryList();
- entries.remove( ".." );
- entries.remove( "." );
+ entries.removeAll( ".." );
+ entries.removeAll( "." );
QStringList::Iterator it = entries.begin();
for ( ; it != entries.end(); ++it )
{
@@ -895,8 +895,8 @@
QDir dir( srcDir );
dir.setFilter( QDir::TypeMask | QDir::Hidden );
QStringList lst( dir.entryList() );
- lst.remove( "." );
- lst.remove( ".." );
+ lst.removeAll( "." );
+ lst.removeAll( ".." );
KUrl::List srcList;
for( QStringList::ConstIterator it = lst.begin(); it != lst.end() ; ++it)
@@ -999,7 +999,7 @@
m_createRealArchTmpDir = new KTempDir( tmpDir() + "create_real_arch" );
m_createRealArchTmpDir->setAutoRemove(false);
u2.setPath( m_createRealArchTmpDir->name() + u1.fileName() );
- KIO::NetAccess::copy( u1, u2, this );
+ KIO::NetAccess::file_copy( u1, u2, this );
m_compressedFile = "file:" + u2.path(); // AGAIN THE 5 SPACES Hack :-(
connect( newArch, SIGNAL( sigCreate( Arch *, bool, const QString &, int ) ),
this, SLOT( createRealArchiveSlotCreate( Arch *, bool,
@@ -1102,7 +1102,7 @@
//Here we pre-calculate the end of the list
KUrl::List::ConstIterator endList = addList.end();
for (KUrl::List::ConstIterator it = addList.begin(); it != endList; ++it)
- list->append( KUrl::decode_string( (*it).url() ) );
+ list->append( QUrl::fromPercentEncoding( (*it).url().toLatin1() ) );
if ( list->count() > 0 )
{
@@ -1152,7 +1152,7 @@
false, this,
i18n("Select Folder to Add"));
- QString dir = KUrl::decode_string( u.url( KUrl::RemoveTrailingSlash ) );
+ QString dir = QUrl::fromPercentEncoding( u.url( KUrl::RemoveTrailingSlash \
).toLatin1() ); if ( !dir.isEmpty() )
{
busy( i18n( "Adding folder..." ) );
--- trunk/KDE/kdeutils/ark/compressedfile.cpp #626173:626174
@@ -162,7 +162,7 @@
KUrl src, target;
src.setPath( m_filename );
target.setPath( m_tmpfile );
- KIO::NetAccess::copy( m_filename, m_tmpfile, m_gui );
+ KIO::NetAccess::file_copy( m_filename, m_tmpfile, m_gui );
kDebug(1601) << "Temp file name is " << m_tmpfile << endl;
@@ -223,8 +223,8 @@
QDir dir( m_tmpdir );
QStringList lst( dir.entryList() );
- lst.remove( ".." );
- lst.remove( "." );
+ lst.removeAll( ".." );
+ lst.removeAll( "." );
KUrl url;
url.setPath( m_tmpdir + lst.first() );
m_tmpfile = url.path();
--- trunk/KDE/kdeutils/ark/extractiondialog.cpp #626173:626174
@@ -114,7 +114,7 @@
comp->setCompletionMode( KGlobalSettings::CompletionAuto );
combobox->setCompletionObject( comp );
combobox->setMaxCount( 20 );
- combobox->setInsertionPolicy( QComboBox::AtTop );
+ combobox->setInsertPolicy( QComboBox::AtTop );
m_urlRequester = new KUrlRequester( combobox, destDirBox );
m_urlRequester->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
--- trunk/KDE/kdeutils/ark/filelistview.cpp #626173:626174
@@ -222,7 +222,7 @@
{
for ( int i = index; i < m_columnMap.count() - 2; i++ )
{
- m_columnMap.replace( i, m_columnMap[ i + 1 ] );
+ m_columnMap.insert( i, m_columnMap[ i + 1 ] );
}
m_columnMap.remove( m_columnMap[ m_columnMap.count() - 1 ] );
@@ -488,7 +488,11 @@
// Get a list of ancestors
QString parentFullname = name.left( name.lastIndexOf( '/' ) );
- QStringList ancestorList = QStringList::split( '/', parentFullname );
+ QStringList ancestorList;
+ if (parentFullname.isEmpty())
+ ancestorList = QStringList();
+ else
+ ancestorList = parentFullname.split( '/' );
// Checks if the listview contains the first item in the list of ancestors
Q3ListViewItem *item = firstChild();
--- trunk/KDE/kdeutils/ark/mainwindow.cpp #626173:626174
@@ -281,7 +281,7 @@
if ( !suggestedName.isEmpty() )
{
filter = QString::null;
- combo->setCurrentIndex(list.findIndex( \
ArchiveFormatInfo::self()->descriptionForMimeType( + \
combo->setCurrentIndex(list.indexOf( \
ArchiveFormatInfo::self()->descriptionForMimeType(
KMimeType::findByPath( suggestedName, 0, true \
)->name() ) ) ); }
@@ -488,7 +488,8 @@
timer = new QTimer( this );
connect( timer, SIGNAL( timeout() ), this, SLOT( slotProgress() ) );
- timer->start( 200, false );
+ timer->setSingleShot( false );
+ timer->start( 200 );
}
void
--- trunk/KDE/kdeutils/ark/rar.cpp #626173:626174
@@ -89,14 +89,14 @@
QStringList list;
- QStringList l2 = QStringList::split( ' ', line );
+ QStringList l2 = QString(line).split( ' ' );
list << m_entryFilename; // filename
list << l2[ 0 ]; // size
list << l2[ 1 ]; // packed
list << l2[ 2 ]; // ratio
- QStringList date = QStringList::split( '-', l2[ 3 ] );
+ QStringList date = l2[3].split( '-' );
list << ArkUtils::fixYear( date[ 2 ].toAscii() ) + "-" + date[ 1 ] + "-" + date [ \
0 ] + " " + l2[4]; // date list << l2[ 5 ]; // attributes
list << l2[ 6 ]; // crc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic