Skip to content

Commit a7959b7

Browse files
committed
Update sip binding
1 parent 3480390 commit a7959b7

File tree

3 files changed

+10
-78
lines changed

3 files changed

+10
-78
lines changed

python/core/qgsarchive.sip

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ class QgsArchive
4545
:rtype: bool
4646
%End
4747

48-
bool zip();
49-
%Docstring
50-
Zip the content of this archive. THe current filename is used.
51-
:return: false if something goes wrong, true otherwise
52-
:rtype: bool
53-
%End
54-
5548
virtual bool unzip( const QString &zipFilename );
5649
%Docstring
5750
Clear the current content of this archive and unzip. Files are unzipped
@@ -61,16 +54,6 @@ class QgsArchive
6154
:rtype: bool
6255
%End
6356

64-
bool unzip();
65-
%Docstring
66-
Clear the current content of this archive and unzip. If a project file
67-
is found in the content, then this archive may be considered as a valid
68-
one. Files are unzipped in the temporary directory. The current filename
69-
is used.
70-
:return: true if a project file has been found, false otherwise
71-
:rtype: bool
72-
%End
73-
7457
void clear();
7558
%Docstring
7659
Clear the current content of this archive and create a new temporary
@@ -84,18 +67,6 @@ class QgsArchive
8467
\param filename A file to add when zipping this archive
8568
%End
8669

87-
void setFileName( const QString &filename );
88-
%Docstring
89-
Set the filename to use when zipping/unzipping this archive.
90-
\param filename The zip filename
91-
%End
92-
93-
QString filename() const;
94-
%Docstring
95-
Returns the current zip filename.
96-
:rtype: str
97-
%End
98-
9970
QStringList files() const;
10071
%Docstring
10172
Returns the list of files within this archive

python/core/qgsproject.sip

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -612,55 +612,7 @@ Returns the number of registered layers.
612612
:rtype: QMap<str, QgsMapLayer *>
613613
%End
614614

615-
bool unzip( const QString &filename );
616-
%Docstring
617-
Unzip a project
618-
\param filename The zip file to unzip
619-
:return: true if unzip is well performed, false otherwise
620-
.. versionadded:: 3.0
621-
:rtype: bool
622-
%End
623-
624-
bool unzip();
625-
%Docstring
626-
Unzip a project with the current zip filename
627-
:return: true if unzip is well performed, false otherwise
628-
.. versionadded:: 3.0
629-
:rtype: bool
630-
%End
631-
632-
bool zip( const QString &filename );
633-
%Docstring
634-
Zip the project
635-
\param filename The zip filename
636-
:return: true if zip is well performed, false otherwise
637-
.. versionadded:: 3.0
638-
:rtype: bool
639-
%End
640-
641-
bool zip();
642-
%Docstring
643-
Zip the project with the current zip filename
644-
:return: true if zip is well performed, false otherwise
645-
.. versionadded:: 3.0
646-
:rtype: bool
647-
%End
648-
649-
QString zipFileName() const;
650-
%Docstring
651-
Returns the current zip filename or an empty string if none.
652-
.. versionadded:: 3.0
653-
:rtype: str
654-
%End
655-
656-
void setZipFileName( const QString &filename );
657-
%Docstring
658-
Sets the current zip filename.
659-
\param filename The zip filename
660-
.. versionadded:: 3.0
661-
%End
662-
663-
bool unzipped() const;
615+
bool isZipped() const;
664616
%Docstring
665617
Returns true if the project comes from a zip archive, false otherwise.
666618
:rtype: bool

python/core/qgsziputils.sip

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
namespace QgsZipUtils
1616
{
1717

18+
bool isZipFile( const QString &filename );
19+
%Docstring
20+
Returns true if the file name is a zipped file ( i.e with a '.qgz'
21+
extension, false otherwise.
22+
\param filename The name of the file
23+
:return: true if the file is zipped, false otherwise
24+
:rtype: bool
25+
%End
26+
1827
bool unzip( const QString &zip, const QString &dir, QStringList &files /Out/ );
1928
%Docstring
2029
Unzip a zip file in an output directory. An error is returned if the zip

0 commit comments

Comments
 (0)