本文整理汇总了C++中QUrl::removeAllQueryItems方法的典型用法代码示例。如果您正苦于以下问题:C++ QUrl::removeAllQueryItems方法的具体用法?C++ QUrl::removeAllQueryItems怎么用?C++ QUrl::removeAllQueryItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QUrl
的用法示例。
在下文中一共展示了QUrl::removeAllQueryItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeAllQueryItems
int Url::removeAllQueryItems ( lua_State * L )// ( const QString & key )
{
QUrl* lhs = ValueInstaller2<QUrl>::check( L, 1 );
//QString* key = ValueInstaller2<QString>::check( L, 2 );
lhs->removeAllQueryItems( Util::toString( L, 2 ) );
return 0;
}
示例2: startHandleRequest
void startHandleRequest(ZhttpRequest *req, int basePathStart, const QByteArray &asPath, const DomainMap::Entry &route)
{
Session *s = new Session(this);
s->req = req;
QUrl uri = req->requestUri();
QByteArray encPath = uri.encodedPath();
s->path = encPath.mid(basePathStart);
QList<QByteArray> parts = s->path.split('/');
if(!parts.isEmpty() && parts.last().startsWith("jsonp"))
{
if(uri.hasQueryItem("callback"))
{
s->jsonpCallback = uri.queryItemValue("callback").toUtf8();
uri.removeAllQueryItems("callback");
}
else if(uri.hasQueryItem("c"))
{
s->jsonpCallback = uri.queryItemValue("c").toUtf8();
uri.removeAllQueryItems("c");
}
}
s->asUri = uri;
s->asUri.setScheme((s->asUri.scheme() == "https") ? "wss" : "ws");
if(!asPath.isEmpty())
s->asUri.setEncodedPath(asPath);
else
s->asUri.setEncodedPath(encPath.mid(0, basePathStart));
s->route = route;
connect(req, SIGNAL(readyRead()), SLOT(req_readyRead()));
connect(req, SIGNAL(bytesWritten(int)), SLOT(req_bytesWritten(int)));
connect(req, SIGNAL(error()), SLOT(req_error()));
sessions += s;
sessionsByRequest.insert(s->req, s);
processRequestInput(s);
}
示例3: removeAllQueryItems
void QUrlProto::removeAllQueryItems(const QString &key)
{
QUrl *item = qscriptvalue_cast<QUrl*>(thisObject());
if (item)
item->removeAllQueryItems(key);
}