mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
generic: replace deprecated std::auto_ptr<T> with std::unique_ptr<T>
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
173adc2e7a
commit
ce5678b0f7
7 changed files with 11 additions and 11 deletions
|
@ -112,7 +112,7 @@ private:
|
|||
|
||||
struct ImageMetaInfoDialogPrivate
|
||||
{
|
||||
std::auto_ptr<PreferredImageMetaInfoModel> mModel;
|
||||
std::unique_ptr<PreferredImageMetaInfoModel> mModel;
|
||||
QTreeView* mTreeView;
|
||||
};
|
||||
|
||||
|
|
|
@ -103,8 +103,8 @@ private:
|
|||
KUrl mUrl;
|
||||
bool mFullScreen;
|
||||
bool mSlideShow;
|
||||
std::auto_ptr<KTempDir> mMultipleUrlsDir;
|
||||
std::auto_ptr<Gwenview::MainWindow> mMainWindow;
|
||||
std::unique_ptr<KTempDir> mMultipleUrlsDir;
|
||||
std::unique_ptr<Gwenview::MainWindow> mMainWindow;
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
|
|
@ -51,7 +51,7 @@ struct ImporterPrivate
|
|||
{
|
||||
Importer* q;
|
||||
QWidget* mAuthWindow;
|
||||
std::auto_ptr<FileNameFormater> mFileNameFormater;
|
||||
std::unique_ptr<FileNameFormater> mFileNameFormater;
|
||||
KUrl mTempImportDir;
|
||||
|
||||
/* @defgroup reset Should be reset in start()
|
||||
|
|
|
@ -123,7 +123,7 @@ void PrintHelper::print(Document::Ptr doc)
|
|||
PrintOptionsPage* optionsPage = new PrintOptionsPage(doc->size());
|
||||
optionsPage->loadConfig();
|
||||
|
||||
std::auto_ptr<QPrintDialog> dialog(
|
||||
std::unique_ptr<QPrintDialog> dialog(
|
||||
KdePrint::createPrintDialog(&printer,
|
||||
QList<QWidget*>() << optionsPage,
|
||||
d->mParent)
|
||||
|
|
|
@ -46,7 +46,7 @@ private Q_SLOTS:
|
|||
void testRenamedCount();
|
||||
|
||||
private:
|
||||
std::auto_ptr<KTempDir> mTempDir;
|
||||
std::unique_ptr<KTempDir> mTempDir;
|
||||
KUrl::List mDocumentList;
|
||||
};
|
||||
|
||||
|
|
|
@ -4053,7 +4053,7 @@ Document::OpenResult Document::openDocumentArchive( const QString & docFile, con
|
|||
if ( !mainEntry || !mainEntry->isFile() )
|
||||
return OpenError;
|
||||
|
||||
std::auto_ptr< QIODevice > mainEntryDevice( static_cast< const KZipFileEntry * >( mainEntry )->createDevice() );
|
||||
std::unique_ptr< QIODevice > mainEntryDevice( static_cast< const KZipFileEntry * >( mainEntry )->createDevice() );
|
||||
QDomDocument doc;
|
||||
if ( !doc.setContent( mainEntryDevice.get() ) )
|
||||
return OpenError;
|
||||
|
@ -4087,7 +4087,7 @@ Document::OpenResult Document::openDocumentArchive( const QString & docFile, con
|
|||
if ( !docEntry || !docEntry->isFile() )
|
||||
return OpenError;
|
||||
|
||||
std::auto_ptr< ArchiveData > archiveData( new ArchiveData() );
|
||||
std::unique_ptr< ArchiveData > archiveData( new ArchiveData() );
|
||||
const int dotPos = documentFileName.indexOf( '.' );
|
||||
if ( dotPos != -1 )
|
||||
archiveData->document.setSuffix( documentFileName.mid( dotPos ) );
|
||||
|
@ -4096,7 +4096,7 @@ Document::OpenResult Document::openDocumentArchive( const QString & docFile, con
|
|||
|
||||
QString tempFileName = archiveData->document.fileName();
|
||||
{
|
||||
std::auto_ptr< QIODevice > docEntryDevice( static_cast< const KZipFileEntry * >( docEntry )->createDevice() );
|
||||
std::unique_ptr< QIODevice > docEntryDevice( static_cast< const KZipFileEntry * >( docEntry )->createDevice() );
|
||||
copyQIODevice( docEntryDevice.get(), &archiveData->document );
|
||||
archiveData->document.close();
|
||||
}
|
||||
|
@ -4104,7 +4104,7 @@ Document::OpenResult Document::openDocumentArchive( const QString & docFile, con
|
|||
const KArchiveEntry * metadataEntry = mainDir->entry( metadataFileName );
|
||||
if ( metadataEntry && metadataEntry->isFile() )
|
||||
{
|
||||
std::auto_ptr< QIODevice > metadataEntryDevice( static_cast< const KZipFileEntry * >( metadataEntry )->createDevice() );
|
||||
std::unique_ptr< QIODevice > metadataEntryDevice( static_cast< const KZipFileEntry * >( metadataEntry )->createDevice() );
|
||||
archiveData->metadataFile.setSuffix( ".xml" );
|
||||
if ( archiveData->metadataFile.open() )
|
||||
{
|
||||
|
|
|
@ -194,7 +194,7 @@ static QString compressedMimeFor( const QString& mime_to_check )
|
|||
const QString app_xz( QString::fromLatin1( "application/x-xz" ) );
|
||||
if ( compressedMimeMap.isEmpty() )
|
||||
{
|
||||
std::auto_ptr< KFilterBase > f;
|
||||
std::unique_ptr< KFilterBase > f;
|
||||
compressedMimeMap[ QString::fromLatin1( "image/x-gzeps" ) ] = app_gzip;
|
||||
// check we can read bzip2-compressed files
|
||||
f.reset( KFilterBase::findFilterByMimeType( app_bzip ) );
|
||||
|
|
Loading…
Add table
Reference in a new issue