本文整理汇总了C++中QCString::isEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ QCString::isEmpty方法的具体用法?C++ QCString::isEmpty怎么用?C++ QCString::isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCString
的用法示例。
在下文中一共展示了QCString::isEmpty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: startLocation
void MemberHandler::startLocation(const QXmlAttributes& attrib)
{
m_defFile = attrib.value("file");
m_bodyFile = attrib.value("bodyfile");
QCString s;
s = attrib.value("line");
if (!s.isEmpty()) m_defLine=s.toInt();
s = attrib.value("bodystart");
if (!s.isEmpty()) m_bodyStart=s.toInt();
s = attrib.value("bodyend");
if (!s.isEmpty()) m_bodyEnd=s.toInt();
}
示例2: endLink
void LatexDocVisitor::endLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
m_t << "}";
if (ref.isEmpty() && !Config_getBool("PDF_HYPERLINKS"))
{
m_t << "{";
filter(theTranslator->trPageAbbreviation());
m_t << "}{" << file;
if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
m_t << anchor << "}";
}
}
示例3: write_description_properties
void UmlItem::write_description_properties(FileOut & out) {
if (! description().isEmpty()) {
static int rank = 0;
out.indent();
out << "<ownedComment xmi:type=\"uml:Comment\" xmi:id=\"COMMENT_"
<< ++rank << "\" body=\"";
out.quote(description());
out << "\"/>\n";
}
QCString ste = stereotype();
if (_gen_extension) {
const QDict<QCString> up = properties();
QDictIterator<QCString> it(up);
if (it.current()) {
out.indent();
out << "<xmi:Extension extender=\"Bouml\">\n";
if (! ste.isEmpty()) {
out.indent();
out << "\t<stereotype name=\"";
out.quote(ste);
out << "\"/>\n";
}
do {
out.indent();
out << "\t<taggedValue tag=\"";
out.quote(it.currentKey());
out << "\" value=\"";
out.quote(*(it.current()));
out << "\"/>\n";
++it;
} while (it.current());
out.indent();
out << "</xmi:Extension>\n";
}
else if (! ste.isEmpty()) {
out.indent();
out << "<xmi:Extension extender=\"Bouml\"><stereotype name=\"";
out.quote(ste);
out << "\"/></xmi:Extension>\n";
}
}
if (ste.contains(':') == 1)
// probably a stereotype part of profile
_stereotypes[ste].append(this);
}
示例4: startDotFile
void DocbookDocVisitor::startDotFile(const QCString &fileName,
const QCString &width,
const QCString &height,
bool hasCaption
)
{
QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
if ((i=baseName.find('.'))!=-1)
{
baseName=baseName.left(i);
}
baseName.prepend("dot_");
QCString outDir = Config_getString("DOCBOOK_OUTPUT");
QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
writeDotGraphFromFile(fileName,outDir,baseName,GOF_BITMAP);
m_t << "<para>" << endl;
m_t << " <figure>" << endl;
m_t << " <title></title>" << endl;
m_t << " <mediaobject>" << endl;
m_t << " <imageobject>" << endl;
m_t << " <imagedata";
if (!width.isEmpty())
{
m_t << " width=\"";
m_t << width;
m_t << "\"";
}
else
{
m_t << " width=\"50%\"";
}
if (!height.isEmpty())
{
m_t << " depth=\"";
m_t << height;
m_t << "\"";
}
m_t << " align=\"center\" valign=\"middle\" scalefit=\"1\" fileref=\"" << baseName << "." << imgExt << "\">";
m_t << "</imagedata>" << endl;
m_t << " </imageobject>" << endl;
if (hasCaption)
{
m_t << " <caption>" << endl;
}
}
示例5: startMscFile
void LatexDocVisitor::startMscFile(const QCString &fileName,
const QCString &width,
const QCString &height,
bool hasCaption
)
{
QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
if ((i=baseName.find('.'))!=-1)
{
baseName=baseName.left(i);
}
baseName.prepend("msc_");
QCString outDir = Config_getString("LATEX_OUTPUT");
QCString name = fileName;
writeMscGraphFromFile(name,outDir,baseName,MSC_EPS);
if (hasCaption)
{
m_t << "\n\\begin{DoxyImage}\n";
}
else
{
m_t << "\n\\begin{DoxyImageNoCaption}\n"
" \\mbox{";
}
m_t << "\\includegraphics";
if (!width.isEmpty())
{
m_t << "[width=" << width << "]";
}
else if (!height.isEmpty())
{
m_t << "[height=" << height << "]";
}
else
{
m_t << "[width=\\textwidth]";
}
m_t << "{" << baseName << "}";
if (hasCaption)
{
m_t << "\n\\caption{";
}
}
示例6: startLink
void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) // internal PDF link
{
if (ref.isEmpty()) {
m_t << "\\hyperlink{";
if (!file.isEmpty()) m_t << stripPath(file);
if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
if (!anchor.isEmpty()) m_t << anchor;
m_t << "}{";
}
else
{
QCString *dest;
m_t << "\\href{";
if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/";
if (!file.isEmpty()) m_t << file << Doxygen::htmlFileExtension;
if (!anchor.isEmpty()) m_t << "#" << anchor;
m_t << "}{";
}
}
else if (ref.isEmpty()) // internal non-PDF link
{
m_t << "\\doxyref{";
}
else // external link
{
m_t << "{\\bf ";
}
}
示例7: disconnectSignal
/**
* Disconnects "signal" of the client named "sender" from the "slot" of
* "receiverObj" in the "conn" client.
*
* Special case:
* If sender & signal are empty all connections that involve
* conn & receiverObj (either as receiver or as sender)
* are disconnected.
*/
bool DCOPSignals::disconnectSignal(const QCString &sender, const QCString &senderObj, const QCString &signal, DCOPConnection *conn,
const QCString &receiverObj, const QCString &slot)
{
if(sender.isEmpty() && signal.isEmpty())
{
removeConnections(conn, receiverObj);
return true;
}
DCOPSignalConnectionList *list = connections.find(signal);
if(!list)
return false; // Not found...
DCOPSignalConnection *next = 0;
bool result = false;
for(DCOPSignalConnection *current = list->first(); current; current = next)
{
next = list->next();
if(current->recvConn != conn)
continue;
if(current->senderConn)
{
if(current->senderConn->appId != sender)
continue;
}
else if(current->sender != sender)
continue;
if(!senderObj.isEmpty() && (current->senderObj != senderObj))
continue;
if(!receiverObj.isEmpty() && (current->recvObj != receiverObj))
continue;
if(!slot.isEmpty() && (current->slot != slot))
continue;
result = true;
list->removeRef(current);
conn->signalConnectionList()->removeRef(current);
if(current->senderConn)
current->senderConn->signalConnectionList()->removeRef(current);
delete current;
}
return result;
}
示例8: importActivity
void UmlState::importActivity(FileIn & in, Token & token) {
QCString k = token.what();
const char * kstr = k;
QCString b = token.valueOf("body");
if (b.isEmpty()) {
if (! token.closed()) {
while (in.read(), !token.close(kstr)) {
QCString s = token.what();
if (s == "body") {
b = in.body("body");
in.finish(k);
break;
}
else if ((s == "node") &&
(token.xmiType() == "uml:CallOperationAction")) {
s = token.valueOf("operation");
if (! s.isEmpty()) {
if (k == "entry")
UnresolvedWithContext::add(this, s, 0);
else if (k == "exit")
UnresolvedWithContext::add(this, s, 1);
else
UnresolvedWithContext::add(this, s, 2);
}
if (! token.closed())
in.finish("node");
in.finish(k);
return;
}
else if (! token.closed())
in.finish(s);
}
}
}
else if (! token.closed())
in.finish(k);
if (! b.isEmpty()) {
if (k == "entry")
set_EntryBehavior(b);
else if (k == "exit")
set_ExitBehavior(b);
else
set_DoActivity(b);
}
}
示例9: ConverseChfn
/*
* The actual work.
* Return values: -1 = unknown error, 0 = ok, >0 = error code.
*/
int ChfnProcess::ConverseChfn(const char *pass)
{
int status=-1;
QCString line;
while(1)
{
line = readLine();
if ( line.isEmpty() )
continue;// discard line
if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ )
{
WaitSlave();
write(m_Fd, pass, strlen(pass));
write(m_Fd, "\n", 1);
}
line = readLine(); // Let's see what the outcome was
if ( line.contains( "Changing finger info" ) )
{
// do nothing
}
else if ( line.contains( "information changed" ) )
{
status=0;
break;
}
else if ( line.isEmpty() )
{
status=0;
break;
}
else if ( line.contains( "Password error" ) || line.contains("Incorrect password") )
{
status=PasswordError;
break;
}
else
{
status=MiscError;
m_Error=line;
break;
}
}
return status;
}
示例10: registeredToDCOP
void KIMProxy::registeredToDCOP( const QCString& appId )
{
//kdDebug( 790 ) << k_funcinfo << " appId '" << appId << "'" << endl;
// check that appId implements our service
// if the appId ends with a number, i.e. a pid like in foobar-12345,
if ( appId.isEmpty() )
return;
bool newApp = false;
// get an up to date list of offers in case a new app was installed
// and check each of the offers that implement the service type we're looking for,
// to see if any of them are the app that just registered
const KService::List offers = KServiceType::offers( IM_SERVICE_TYPE );
KService::List::const_iterator it;
for ( it = offers.begin(); it != offers.end(); ++it )
{
QCString dcopObjectId = "KIMIface";
QCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1();
if ( appId.left( dcopService.length() ) == dcopService )
{
// if it's not already known, insert it
if ( !m_im_client_stubs.find( appId ) )
{
newApp = true;
kdDebug( 790 ) << "App: " << appId << ", dcopService: " << dcopService << " started, using it for presence info."<< endl;
m_im_client_stubs.insert( appId, new KIMIface_stub( d->dc, appId, dcopObjectId ) );
}
}
//else
// kdDebug( 790 ) << "App doesn't implement our ServiceType" << endl;
}
//if ( newApp )
// emit sigPresenceInfoExpired();
}
示例11: getExtension
static QCString getExtension()
{
/*
* [.][nuber][rest]
* in case of . missing, just ignore it
* in case number missing, just place a 3 in front of it
*/
QCString ext = Config_getString("MAN_EXTENSION");
if (ext.isEmpty())
{
ext = "3";
}
else
{
if (ext.at(0)=='.')
{
if (ext.length()==1)
{
ext = "3";
}
else // strip .
{
ext = ext.mid(1);
}
}
if (ext.at(0)<'0' || ext.at(0)>'9')
{
ext.prepend("3");
}
}
return ext;
}
示例12: respond
void ConnectionHandler::respond(int ok, QCString s)
{
QCString buf;
switch(ok)
{
case Res_OK:
buf = "OK";
break;
case Res_NO:
default:
buf = "NO";
break;
}
if(!s.isEmpty())
{
buf += ' ';
buf += s;
}
buf += '\n';
send(m_Fd, buf.data(), buf.length(), 0);
}
示例13: writePageFooter
static void writePageFooter(QTextStream &t,const QCString &lastTitle,
const QCString relPath)
{
if (g_footer.isEmpty())
{
t << "<hr size=\"1\"><address style=\"align: right;\"><small>";
t << theTranslator->trGeneratedAt(
dateToString(TRUE),
Config_getString("PROJECT_NAME")
);
t << " " << endl << "<a href=\"http://www.doxygen.org/index.html\">";
t << endl << "<img src=\"" << relPath << "doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=\"0\">" << "</a> " << versionString << " ";
t << "</small></address>";
if (Debug::isFlagSet(Debug::Validate))
{
t << "<p><a href=\"http://validator.w3.org/check/referer\">"
"<img border=\"0\" src=\"http://www.w3.org/Icons/valid-html401\""
" height=\"31\" width=\"88\" alt=\"This page is Valid HTML 4.01 "
"Transitional!\"></a><a href=\"http://jigsaw.w3.org/css-validator/\">"
"<img style=\"border:0;width:88px;height:31px\" "
"src=\"http://jigsaw.w3.org/css-validator/images/vcss\" "
"alt=\"This page uses valid CSS!\"></a></p>";
}
t << "\n</body>\n</html>\n";
}
else
{
t << substituteKeywords(g_footer,convertToHtml(lastTitle),relPath);
}
}
示例14: process
void FixedFormParser::process(const QCString &line, const QString &fileName, int lineNum)
{
QCString simplified;
int l = line.length();
for (int i=0; i < l; ++i)
if (line[i] != ' ')
simplified += line[i];
if ( simplified.isEmpty() ) return;
QString name;
if (functionre.search(simplified) != -1)
name = functionre.cap(3);
else if (subroutinere.search(simplified) != -1)
name = subroutinere.cap(1);
else
return;
FunctionDom method = m_model->create<FunctionModel>();
method->setName(name);
method->setFileName(fileName);
method->setStartPosition(lineNum, 0);
if( !m_file->hasFunction(method->name()) )
m_file->addFunction(method);
}
示例15: lookupSymbols
static void lookupSymbols(const QCString &sym)
{
if (!sym.isEmpty())
{
DefinitionIntf *di = Doxygen::symbolMap->find(sym);
if (di)
{
if (di->definitionType()==DefinitionIntf::TypeSymbolList)
{
DefinitionListIterator dli(*(DefinitionList*)di);
Definition *d;
// for each symbol with the given name
for (dli.toFirst();(d=dli.current());++dli)
{
lookupSymbol(d);
}
}
else
{
lookupSymbol((Definition*)di);
}
}
else
{
printf("Unknown symbol\n");
}
}
}