当前位置: 首页>>代码示例>>C++>>正文


C++ KviCString::append方法代码示例

本文整理汇总了C++中KviCString::append方法的典型用法代码示例。如果您正苦于以下问题:C++ KviCString::append方法的具体用法?C++ KviCString::append怎么用?C++ KviCString::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KviCString的用法示例。


在下文中一共展示了KviCString::append方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: writeEntry

void KviConfigurationFile::writeEntry(const QString & szKey,const QList<int> &list)
{
	m_bDirty = true;
	KviConfigurationFileGroup * p_group = getCurrentGroup();
	KviCString szData;
	for(QList<int>::ConstIterator it = list.begin();it != list.end();++it)
	{
		if(szData.hasData())szData.append(',');
		szData.append(KviCString::Format,"%d",*it);
	}
	//qDebug("Writing option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),szData.ptr());

	p_group->replace(szKey,new QString(szData.ptr()));
}
开发者ID:tronsha,项目名称:KVIrc,代码行数:14,代码来源:KviConfigurationFile.cpp

示例2: printSSLCertificate

	KVIRC_API void printSSLCertificate(KviWindow * wnd, const char * description, KviSSLCertificate * c)
	{
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]: %c%s"), KviControlCodes::Bold, description);
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:  Version: %c%d"), KviControlCodes::Bold, c->version());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:  Serial number: %c%d"), KviControlCodes::Bold, c->serialNumber());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:  Subject:"));
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Common name: %c%s"), KviControlCodes::Bold, c->subjectCommonName());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Organization: %c%s"), KviControlCodes::Bold, c->subjectOrganization());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Organizational unit: %c%s"), KviControlCodes::Bold, c->subjectOrganizationalUnit());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Country: %c%s"), KviControlCodes::Bold, c->subjectCountry());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     State or province: %c%s"), KviControlCodes::Bold, c->subjectStateOrProvince());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Locality: %c%s"), KviControlCodes::Bold, c->subjectLocality());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:   Issuer:"));
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Common name: %c%s"), KviControlCodes::Bold, c->issuerCommonName());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Organization: %c%s"), KviControlCodes::Bold, c->issuerOrganization());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Organizational unit: %c%s"), KviControlCodes::Bold, c->issuerOrganizationalUnit());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Country: %c%s"), KviControlCodes::Bold, c->issuerCountry());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     State or province: %c%s"), KviControlCodes::Bold, c->issuerStateOrProvince());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:     Locality: %c%s"), KviControlCodes::Bold, c->issuerLocality());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:   Public key: %c%s (%d bits)"), KviControlCodes::Bold, c->publicKeyType(), c->publicKeyBits());
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:   Signature type: %c%s"), KviControlCodes::Bold, c->signatureType());
		KviCString tmp = c->signatureContents();
		if(tmp.len() > 40)
		{
			tmp.cutRight(tmp.len() - 40);
			tmp.append("...");
		}
		wnd->output(KVI_OUT_SSL, __tr2qs("[SSL]:   Signature contents: %c%s"), KviControlCodes::Bold, tmp.ptr());
	}
开发者ID:CardinalSins,项目名称:KVIrc,代码行数:29,代码来源:KviSSLMaster.cpp

示例3: parse

bool KviIrcUrl::parse(const char * url, KviCString & cmdBuffer, int contextSpec)
{
	// irc[6]://<server>[:<port>][/<channel>[?<pass>]]

	KviIrcUrlParts urlParts;
	KviIrcUrl::split(url, urlParts);

	if(urlParts.iError & InvalidUrl)
		return false;

	cmdBuffer = "server ";
	switch(contextSpec)
	{
		case KVI_IRCURL_CONTEXT_FIRSTFREE:
			cmdBuffer.append("-u ");
			break;
		case KVI_IRCURL_CONTEXT_NEW:
			cmdBuffer.append("-n ");
			break;
	}
	if(urlParts.bIPv6)
		cmdBuffer.append(" -i ");
	if(urlParts.bSsl)
		cmdBuffer.append(" -s ");

	QString channels, passwords;
	QStringList splitted;

	if(urlParts.chanList.size())
	{
		for(int i = 0; i < urlParts.chanList.size(); ++i)
		{
			splitted = urlParts.chanList[i].split("?");
			if(i)
				channels.append(",");
			if(!(splitted[0].startsWith("#") || splitted[0].startsWith("!") || splitted[0].startsWith("&")))
				channels.append("#");
			channels.append(splitted[0]);

			if(splitted.size() > 1)
			{
				if(i)
					passwords.append(",");
				passwords.append(splitted[1]);
			}
		}

		cmdBuffer.append(KviCString::Format, " -c=\"join %s %s\" ", channels.data(), passwords.data());
	}

	cmdBuffer.append(urlParts.szHost);
	cmdBuffer.append(KviCString::Format, " %d", urlParts.iPort);

	cmdBuffer.append(';');

	return true;
}
开发者ID:Cizzle,项目名称:KVIrc,代码行数:57,代码来源:KviIrcUrl.cpp

示例4: blockFromBuffer

	void blockFromBuffer(KviCString & szBuffer)
	{
		indent(szBuffer);
		szBuffer.prepend("{\n");
		szBuffer.stripRightWhiteSpace();
		szBuffer.ensureLastCharIs('\n');
		szBuffer.append("}\n");
	}
开发者ID:namikaze90,项目名称:KVIrc-old,代码行数:8,代码来源:KviCommandFormatter.cpp


注:本文中的KviCString::append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。