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


C++ KILE_DEBUG函数代码示例

本文整理汇总了C++中KILE_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ KILE_DEBUG函数的具体用法?C++ KILE_DEBUG怎么用?C++ KILE_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: KILE_DEBUG

void ProjectView::refreshProjectTree(const KileProject *project)
{
	KILE_DEBUG() << "\tProjectView::refreshProjectTree(" << project->name() << ")";
	ProjectViewItem *parent= projectViewItemFor(project->url());

	//clean the tree
	if(parent) {
		KILE_DEBUG() << "\tusing parent projectviewitem " << parent->url().fileName();
		parent->setFolder(-1);
		QList<QTreeWidgetItem*> children = parent->takeChildren();
		for(QList<QTreeWidgetItem*>::iterator it = children.begin();
		    it != children.end(); ++it) {
			delete(*it);
		}
	}
	else {
		return;
	}

	//create the non-sources dir
	//ProjectViewItem *nonsrc = new ProjectViewItem(parent, i18n("non-sources"));
	//parent->setNonSrc(nonsrc);

	QList<KileProjectItem*> list = project->rootItems();
	for(QList<KileProjectItem*>::iterator it = list.begin(); it != list.end(); ++it) {
		addTree(*it, parent);
	}

	parent->sortChildren(0, Qt::AscendingOrder);
	// seems to be necessary to get a correct refreh (Qt 4.4.3)
	bool expanded = parent->isExpanded();
	parent->setExpanded(!expanded);
	parent->setExpanded(expanded);
}
开发者ID:puneetsl,项目名称:Mikhail,代码行数:34,代码来源:projectview.cpp

示例2: KILE_DEBUG

void LaTeXInfo::installParserOutput(KileParser::ParserOutput *parserOutput)
{
	KILE_DEBUG();
	KileParser::LaTeXParserOutput *latexParserOutput = dynamic_cast<KileParser::LaTeXParserOutput*>(parserOutput);
	Q_ASSERT(latexParserOutput);
	if(!latexParserOutput) {
		KILE_DEBUG() << "wrong type given";
		return;
	}

	m_labels = latexParserOutput->labels;
	m_bibItems = latexParserOutput->bibItems;
	m_deps = latexParserOutput->deps;
	m_bibliography = latexParserOutput->bibliography;
	m_packages = latexParserOutput->packages;
	m_newCommands = latexParserOutput->newCommands;
	m_asyFigures = latexParserOutput->asyFigures;
	m_preamble = latexParserOutput->preamble;
	m_bIsRoot = latexParserOutput->bIsRoot;

	checkChangedDeps();
	emit(isrootChanged(isLaTeXRoot()));
	setDirty(false);
	emit(parsingComplete());
}
开发者ID:fagu,项目名称:kileip,代码行数:25,代码来源:documentinfo.cpp

示例3: KILE_DEBUG

	void Help::readHelpList(const QString &filename)
	{
		// clear old map
		m_dictHelpTex.clear();

		QString file = m_helpDir + filename;
		if(file.isEmpty()) {
			KILE_DEBUG() << "   file not found: " << filename << endl;
			return;
		}

//		KILE_DEBUG() << "   read file: " << filename << endl;
		KILE_DEBUG() << "read keyword file: " << file;
		QRegExp reg("\\s*(\\S+)\\s*=>\\s*(\\S+)");

		QFile f(file);
		if(f.open(QIODevice::ReadOnly)) { // file opened successfully
			QTextStream t(&f);         // use a text stream
			while(!t.atEnd()) { // until end of file...
				QString s = t.readLine().trimmed();       // line of text excluding '\n'
				if(!(s.isEmpty() || s.at(0)=='#')) {
					int pos = reg.indexIn(s);
					if ( pos != -1 ) {
						m_dictHelpTex[reg.cap(1)] = reg.cap(2);
					}
				}
			}
			f.close();
		}
	}
开发者ID:fagu,项目名称:kileip,代码行数:30,代码来源:kilehelp.cpp

示例4: KILE_DEBUG

bool UserMenuDialog::saveClicked()
{
	if ( m_currentXmlFile.isEmpty() ) {
		return false;
	}
	KILE_DEBUG() << "save menutree: " << m_currentXmlFile;

	// read current entry
	QTreeWidgetItem *current = m_menutree->currentItem();
	if ( current ) {
		kdDebug() << "read current item ...";
		readMenuentryData( dynamic_cast<UserMenuItem *>(current) );
	}

	if ( saveCheck() == false ) {
		return false;
	}

	// force to save file in local directory
	QStringList dirs = KGlobal::dirs()->findDirs("appdata", "usermenu/");
	if ( dirs.size() > 1 ) {
		if ( m_currentXmlFile.startsWith(dirs[1]) ) {
			m_currentXmlFile.replace(dirs[1],dirs[0]);
			KILE_DEBUG() << "change filename to local directory: " << m_currentXmlFile;
		}
	}

	// save file
	m_menutree->writeXml(m_currentXmlFile);
	return true;
}
开发者ID:fagu,项目名称:kileip,代码行数:31,代码来源:usermenudialog.cpp

示例5: KILE_DEBUG

void FindFilesDialog::slotSearch()
{
	KILE_DEBUG() << "\tgrep: start slot search" << m_proc;

	if (m_proc) {
		clearGrepJobs();
		finish();
		return;
	}

	if (template_combo->currentIndex() < KileGrep::tmEnv && pattern_combo->currentText().isEmpty()) {
		return;
	}

	KILE_DEBUG() << "\tgrep: start new search";
	QRegExp re(getPattern());
	if(!re.isValid()) {
		KMessageBox::error(m_ki->mainWindow(), i18n("Invalid regular expression: %1", re.errorString()), i18n("Grep Tool Error"));
		return;
	}

	resultbox->setCursor(QCursor(Qt::WaitCursor));
	search_button->setText(i18n("&Cancel"));
	if (template_combo->currentIndex() < KileGrep::tmEnv) {
		m_TemplateList[m_lastTemplateIndex] = template_edit->text();
	}

	// start grep command
	m_grepJobs = (m_mode == KileGrep::Project) ? m_projectfiles.count() : 1;
	startGrep();
}
开发者ID:fagu,项目名称:kileip,代码行数:31,代码来源:findfilesdialog.cpp

示例6: KILE_DEBUG

void SideBar::showPage(QWidget *widget)
{
	KILE_DEBUG() << "===SideBar::showPage(" << widget << ")";
	int i = m_tabStack->indexOf(widget);
	KILE_DEBUG() << "i is " << i;
	if(i >= 0) {
		switchToTab(i);
	}
}
开发者ID:fagu,项目名称:kileip,代码行数:9,代码来源:sidebar.cpp

示例7: KILE_DEBUG

// read an xml file and check for errors
bool UserMenuTree::readXml(const QString &filename)
{
	KILE_DEBUG() << "read xml file " << filename;

	QDomDocument doc("UserMenu");
	QFile file(filename);
	if ( !file.open(QFile::ReadOnly | QFile::Text) ) {
		KMessageBox::error(this, i18n("File '%1' does not exist.", filename));
		return false;
	}
	if ( !doc.setContent( &file ) ) {
		file.close();
		return false;
	}
	file.close();

	KILE_DEBUG() << "parse xml ...";
	blockSignals(true);

	// clear menutree
	clear();

	// read toplevelitems
	QDomElement root = doc.documentElement();
	QDomElement e = root.firstChildElement();
	while ( !e.isNull()) {
		QString tag = e.tagName();

		UserMenuItem *item = NULL;
		if ( tag == "submenu" ) {
			item = readXmlSubmenu(e);
		}
		else if ( tag == "separator" ) {
			item = readXmlSeparator();
		}
		else /* if ( tag == "menu" ) */ {
			item = readXmlMenuentry(e);
		}

		if ( item ) {
			addTopLevelItem(item);
		}
		e = e.nextSiblingElement();
	}

	// the xml menu is built, now check for errors
	setErrorCodes();

	// polish menutree
	expandAll();
	if ( topLevelItemCount() > 0 ) {
		setCurrentItem( topLevelItem(0) );
	}
	blockSignals(false);

	return true;
}
开发者ID:fagu,项目名称:kileip,代码行数:58,代码来源:usermenutree.cpp

示例8: scriptError

// Executes script code in this environment.
void ScriptEnvironment::execute(const Script *script)
{
	// initialize engine to work with Cursor and Range objects
	m_engine->evaluate(m_enginePluginCode,i18n("Cursor/Range plugin"));

	if ( m_engine->hasUncaughtException() ) {
		scriptError(i18n("Cursor/Range plugin"));
		return;
	}
	else {
		KILE_DEBUG() << "Cursor/Range plugin successfully installed ";
	}

	// set global objects
	if ( m_scriptView->view() ) {
		m_engine->globalObject().setProperty("view", m_engine->newQObject(m_scriptView));
		m_engine->globalObject().setProperty("document", m_engine->newQObject(m_scriptDocument));
	}
	m_engine->globalObject().setProperty("kile", m_engine->newQObject(m_kileScriptObject));

  // export debug function
  m_engine->globalObject().setProperty("debug", m_engine->newFunction(KileScript::debug));

	// start engine
	m_engine->evaluate(script->getCode());

	// success or error
	if ( m_engine->hasUncaughtException() ) {
		scriptError(script->getName());
	}
	else {
		KILE_DEBUG() << "script finished without errors";
	}

 //FIXME: add time execution limit once it becomes available
// 			bool useGuard = KileConfig::timeLimitEnabled();
// 			uint timeLimit = (uint)KileConfig::timeLimit();
// 			KJSCPUGuard guard;
// 			if(useGuard) {
// 				guard.start(timeLimit*1000);
// 			}
// 			KJS::Completion completion = m_interpreter->evaluate(QString(), 0, s);
// 			if(useGuard) {
// 				guard.stop();
// 			}
	QTimer::singleShot(0, m_scriptView->view(), SLOT(setFocus()));

	// remove global objects
	m_engine->globalObject().setProperty("view", QScriptValue());
	m_engine->globalObject().setProperty("document", QScriptValue());
	m_engine->globalObject().setProperty("kile", QScriptValue());
}
开发者ID:fagu,项目名称:kileip,代码行数:53,代码来源:script.cpp

示例9: locateTexLive201x

	void Help::initTexDocumentation()
	{
		// use documentation for teTeX v3.x, TexLive 2005-2007, TexLive 2009, TexLive2 010-2011 (TUG)
		m_texdocPath = KileConfig::location();

		// first check for TexLive 2010-2011 (TUG)
		m_texlivePath = locateTexLive201x();
		if ( !m_texlivePath.isEmpty() ) {
			KILE_DEBUG() << "found TexLive 2010-2011 (TUG): " << m_texlivePath;
			m_texVersion = TEXLIVE_201x_TUG;
			m_texVersionText = "TexLive " + m_texlivePath.right(4) + " (TUG)";
			m_texrefsReference = "/generic/tex-refs/";
			return;
		}

		//  then check for TexLive 2009 (as found with Debian, Ubuntu, ...)
		QDir dir(m_texdocPath + "/generic/tex-refs/");
		if ( dir.exists() )  {
			KILE_DEBUG() << "found TexLive 2009: " << m_texdocPath;
			m_texVersion = TEXLIVE2009;
			m_texVersionText = "TexLive 2009";
			m_texrefsReference = "/generic/tex-refs/";
			return;
		}

		// then check for older versions of TexLive 2005-2007
		dir.setPath(m_texdocPath + "/english/tex-refs");
		if ( dir.exists() ) {
			KILE_DEBUG() << "found TexLive 2005-2007: " << m_texdocPath;
			m_texVersion = TEXLIVE2005;
			m_texVersionText = "TexLive 2005-2007";
			m_texrefsReference = "/english/tex-refs/";
			return;
		}

		// finally we check for tetex3
		dir.setPath(m_texdocPath + "/latex/tex-refs");
		if ( dir.exists() )  {
			m_texVersion = TETEX3;
			m_texVersionText = "teTeX v3.x";
			// check if this is buggy tetex3.0 or an updated version with subdirectory 'html'
			dir.setPath(m_texdocPath + "/latex/tex-refs/html");
			m_texrefsReference = ( dir.exists() ) ? "/latex/tex-refs/html/" : "/latex/tex-refs/";
			return;
		}

		// found no tex documents for LaTeX help
		m_texVersion = TEX_UNKNOWN;
	}
开发者ID:fagu,项目名称:kileip,代码行数:49,代码来源:kilehelp.cpp

示例10: KProcess

void FindFilesDialog::startGrep()
{
	m_proc = new KProcess(this);
	m_proc->setOutputChannelMode(KProcess::SeparateChannels);

	m_buf.clear();
	m_errbuf.clear();
	QString command;
	if (m_mode == KileGrep::Project) {
		command = buildProjectCommand() + ' ' + KShell::quoteArg(m_projectfiles[m_grepJobs-1]);
	}
	else {
		command = buildFilesCommand();
	}
	KILE_DEBUG() << "\tgrep (project): " <<  command;
	(*m_proc) << KShell::splitArgs(command);

	m_grepJobs--;

	connect(m_proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(processExited(int, QProcess::ExitStatus)));
	connect(m_proc, SIGNAL(readyReadStandardOutput()), this, SLOT(processStandardOutputReady()));
	connect(m_proc, SIGNAL(readyReadStandardError()), this, SLOT(processErrorOutputReady()));

	m_proc->start();
}
开发者ID:fagu,项目名称:kileip,代码行数:25,代码来源:findfilesdialog.cpp

示例11: parentFor

ProjectViewItem* ProjectView::folder(const KileProjectItem *pi, ProjectViewItem *item)
{
	ProjectViewItem *parent = parentFor(pi, item);

	if(!parent) {
		kError() << "no parent for " << pi->url().toLocalFile();
		return NULL;
	}

	// we have already found the parent folder
	if(parent->type() == KileType::Folder) {
		return parent;
	}

	// we are looking at the children, if there is an existing folder for this type
	ProjectViewItem *folder;

	// determine the foldername for this type
	QString foldername;
	switch(pi->type()) {
		case (KileProjectItem::ProjectFile):
			foldername = i18n("projectfile");
		break;
		case (KileProjectItem::Package):
			foldername = i18n("packages");
		break;
		case (KileProjectItem::Image):
			foldername = i18n("images");
		break;
		case (KileProjectItem::Other):
		default :
			foldername = i18n("other");
		break;
	}

	// if there already a folder for this type on this level?
	bool found = false;
	QTreeWidgetItemIterator it(parent);
	++it; // skip 'parent'
	while(*it) {
		folder = dynamic_cast<ProjectViewItem*>(*it);
		if(folder && folder->text(0) == foldername) {
			found = true;
			break;
		}
		++it;
	}
	
	// if no folder was found, we must create a new one
	if(!found) {
		folder = new ProjectViewItem(parent, foldername);
		KILE_DEBUG() << "new folder: parent=" << parent->url().url()
		             << ", foldername=" << foldername;

		folder->setFolder(pi->type());
		folder->setType(KileType::Folder);
	}

	return folder;
}
开发者ID:puneetsl,项目名称:Mikhail,代码行数:60,代码来源:projectview.cpp

示例12: switch

	void Help::helpTexGuide()
	{
		QString filename = m_texdocPath;

		switch(m_texVersion) {
			case TEXLIVE_201x_TUG:
				filename = filename.replace("texmf-dist","texmf");
				filename += "/texlive/texlive-en/texlive-en.html";
				break;
			case TEXLIVE2009:
				filename += "/texlive/texlive-en/texlive-en.html";
				break;
			case TEXLIVE2005:
				filename += "/english/texlive-en/live.html";
				break;
			case TETEX3:
				filename += "/index.html";
				break;
			default:
				return;
		}

		KILE_DEBUG() << "show TeX Guide: " <<  m_texVersionText << " file=" << filename;
		showHelpFile( filename );
	}
开发者ID:fagu,项目名称:kileip,代码行数:25,代码来源:kilehelp.cpp


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