本文整理汇总了C++中QUrl::setQueryDelimiters方法的典型用法代码示例。如果您正苦于以下问题:C++ QUrl::setQueryDelimiters方法的具体用法?C++ QUrl::setQueryDelimiters怎么用?C++ QUrl::setQueryDelimiters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QUrl
的用法示例。
在下文中一共展示了QUrl::setQueryDelimiters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fetchImage
void EnrichmentDialog::fetchImage()
{
TexWidget *tw = qobject_cast<TexWidget *>(d_widget);
if (tw && tw->formula() == equationEditor->toPlainText() && !tw->pixmap().isNull())
return;
clearButton->setEnabled(false);
updateButton->setEnabled(false);
equationEditor->setReadOnly(true);
if (texCompilerBox->currentIndex() == 1){
if (compileProcess)
delete compileProcess;
compileProcess = new QProcess(this);
connect(compileProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
this, SLOT(finishedCompiling(int, QProcess::ExitStatus)));
connect(compileProcess, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(displayCompileError(QProcess::ProcessError)));
compileProcess->setWorkingDirectory(QDir::tempPath());
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
QString program = ((ApplicationWindow *)parentWidget())->d_latex_compiler_path;
QStringList arguments;
arguments << createTempTexFile();
compileProcess->start(program, arguments);
return;
}
QUrl url;
url.setPath("/cgi-bin/mathtran");
url.setQueryDelimiters('=', ';');
url.addQueryItem("D", "3");
url.addQueryItem("tex", QUrl::toPercentEncoding(
equationEditor->toPlainText()));
http->get(url.toString());
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
}
示例2: makeXmppUri
QString XmppUriQueries::makeXmppUri(const Jid &AContactJid, const QString &AAction, const QMultiMap<QString, QString> &AParams) const
{
if (AContactJid.isValid() && !AAction.isEmpty())
{
QUrl url;
url.setQueryDelimiters('=',';');
url.setScheme(XMPP_URI_SCHEME);
url.setPath(AContactJid.full());
QList< QPair<QString, QString> > query;
query.append(qMakePair<QString,QString>(AAction,QString::null));
for(QMultiMap<QString, QString>::const_iterator it=AParams.constBegin(); it!=AParams.end(); ++it)
query.append(qMakePair<QString,QString>(it.key(),it.value()));
url.setQueryItems(query);
return url.toString().replace(QString("?%1=;").arg(AAction),QString("?%1;").arg(AAction));
}
return QString::null;
}
示例3: setQueryDelimiters
void QUrlProto::setQueryDelimiters(char valueDelimiter, char pairDelimiter)
{
QUrl *item = qscriptvalue_cast<QUrl*>(thisObject());
if (item)
item->setQueryDelimiters(valueDelimiter, pairDelimiter);
}