kio: drop unused errorPage metadata feature

it defaults to false btw, it is empty string by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-14 03:47:09 +03:00
parent 67e22b159a
commit 2f217c0823
8 changed files with 2 additions and 48 deletions

View file

@ -51,9 +51,6 @@ Languages string Language(s) send in the "Accept-Language:" HTTP
request-id number Sequence number to identify requests in a MultiGet command.
errorPage bool Flag that indicates that an errorPage() is preferred over an
error(). (default:true)
no-auth bool Flag that indicates that no authentication (neither WWW nor proxy)
attempts should be made.
no-www-auth bool Flag that indicates that no HTTP WWW authentication attempts should

View file

@ -1162,11 +1162,6 @@ bool TransferJob::doResume()
return true;
}
bool TransferJob::isErrorPage() const
{
return d_func()->m_errorPage;
}
void TransferJobPrivate::start(Slave *slave)
{
Q_Q(TransferJob);
@ -1188,9 +1183,6 @@ void TransferJobPrivate::start(Slave *slave)
q->connect( slave, SIGNAL(mimeType(QString)),
SLOT(slotMimetype(QString)) );
q->connect( slave, SIGNAL(errorPage()),
SLOT(slotErrorPage()) );
q->connect( slave, SIGNAL(needSubUrlData()),
SLOT(slotNeedSubUrlData()) );
@ -1235,11 +1227,6 @@ void TransferJob::slotMetaData( const KIO::MetaData &_metaData)
storeSSLSessionFromJob(d->m_redirectionURL);
}
void TransferJobPrivate::slotErrorPage()
{
m_errorPage = true;
}
void TransferJobPrivate::slotCanResume( KIO::filesize_t offset )
{
Q_Q(TransferJob);
@ -1922,7 +1909,6 @@ void FileCopyJobPrivate::slotCanResume( KIO::Job* job, KIO::filesize_t offset )
{
m_getJob = KIO::get( m_src, NoReload, HideProgressInfo /* no GUI */ );
//kDebug(7007) << "m_getJob=" << m_getJob << m_src;
m_getJob->addMetaData( "errorPage", "false" );
m_getJob->addMetaData( "AllowCompressedPage", "false" );
// Set size in subjob. This helps if the slave doesn't emit totalSize.
if ( m_sourceSize != (KIO::filesize_t)-1 )

View file

@ -252,20 +252,19 @@ namespace KIO {
inline TransferJobPrivate(const KUrl& url, int command, const QByteArray &packedArgs,
const QByteArray &_staticData)
: SimpleJobPrivate(url, command, packedArgs),
m_internalSuspended(false), m_errorPage(false),
m_internalSuspended(false),
staticData(_staticData), m_isMimetypeEmitted(false), m_subJob(0)
{ }
inline TransferJobPrivate(const KUrl& url, int command, const QByteArray &packedArgs,
QIODevice* ioDevice)
: SimpleJobPrivate(url, command, packedArgs),
m_internalSuspended(false), m_errorPage(false),
m_internalSuspended(false),
m_isMimetypeEmitted(false), m_subJob(0),
m_outgoingDataSource(ioDevice)
{ }
bool m_internalSuspended;
bool m_errorPage;
QByteArray staticData;
KUrl m_redirectionURL;
KUrl::List m_redirectionList;
@ -297,7 +296,6 @@ namespace KIO {
*/
virtual void slotDataReqFromDevice();
void slotErrorPage();
void slotCanResume( KIO::filesize_t offset );
void slotNeedSubUrlData();
void slotSubUrlData(KIO::Job*, const QByteArray &);

View file

@ -534,15 +534,6 @@ namespace KIO {
*/
void setModificationTime( const QDateTime& mtime );
/**
* Checks whether we got an error page. This currently only happens
* with HTTP urls. Call this from your slot connected to result().
*
* @return true if we got an (HTML) error page from the server
* instead of what we asked for.
*/
bool isErrorPage() const;
/**
* Enable the async data mode.
* When async data is enabled, data should be provided to the job by
@ -646,7 +637,6 @@ namespace KIO {
protected:
TransferJob(TransferJobPrivate &dd);
private:
Q_PRIVATE_SLOT(d_func(), void slotErrorPage())
Q_PRIVATE_SLOT(d_func(), void slotCanResume( KIO::filesize_t offset ))
Q_PRIVATE_SLOT(d_func(), void slotNeedSubUrlData())
Q_PRIVATE_SLOT(d_func(), void slotSubUrlData(KIO::Job*, const QByteArray &))

View file

@ -593,11 +593,6 @@ void SlaveBase::redirection( const KUrl& _url )
send( INF_REDIRECTION, data );
}
void SlaveBase::errorPage()
{
send( INF_ERROR_PAGE );
}
static bool isSubCommand(int cmd)
{
return ( (cmd == CMD_REPARSECONFIGURATION) ||

View file

@ -205,13 +205,6 @@ public:
*/
void redirection( const KUrl &_url );
/**
* Tell that we will only get an error page here.
* This means: the data you'll get isn't the data you requested,
* but an error page (usually HTML) that describes an error.
*/
void errorPage();
/**
* Call this in mimetype() and in get(), when you know the mimetype.
* See mimetype about other ways to implement it.

View file

@ -249,9 +249,6 @@ bool SlaveInterface::dispatch(int _cmd, const QByteArray &rawdata)
d->speed_timer.stop();
emit speed( ul );
break;
case INF_ERROR_PAGE:
emit errorPage();
break;
case INF_REDIRECTION: {
KUrl url;
stream >> url;

View file

@ -49,7 +49,6 @@ class SlaveInterfacePrivate;
INF_SPEED,
INF_REDIRECTION = 20,
INF_MIME_TYPE = 21,
INF_ERROR_PAGE = 22,
INF_WARNING = 23,
INF_INFOMESSAGE,
INF_META_DATA,
@ -165,7 +164,6 @@ Q_SIGNALS:
void position( KIO::filesize_t );
void speed( unsigned long );
void errorPage();
void mimeType( const QString & );
void warning( const QString & );
void infoMessage( const QString & );