forked from qt-creator/qt-creator
Remove debugging output
This commit is contained in:
@@ -763,7 +763,7 @@ namespace {
|
||||
// TODO this function should also be called if the build directory is changed
|
||||
QStringList Qt4ProFileNode::updateUiFiles()
|
||||
{
|
||||
qDebug()<<"Qt4ProFileNode::updateUiFiles()";
|
||||
// qDebug()<<"Qt4ProFileNode::updateUiFiles()";
|
||||
// Only those two project types can have ui files for us
|
||||
if (m_projectType != ApplicationTemplate
|
||||
&& m_projectType != LibraryTemplate)
|
||||
@@ -1051,7 +1051,7 @@ void Qt4ProFileNode::updateCodeModelSupportFromEditor(const QString &uiFileName,
|
||||
|
||||
void Qt4ProFileNode::createUiCodeModelSupport()
|
||||
{
|
||||
qDebug()<<"creatUiCodeModelSupport()";
|
||||
// qDebug()<<"creatUiCodeModelSupport()";
|
||||
CppTools::CppModelManagerInterface *modelManager
|
||||
= ExtensionSystem::PluginManager::instance()->getObject<CppTools::CppModelManagerInterface>();
|
||||
|
||||
@@ -1077,16 +1077,16 @@ void Qt4ProFileNode::createUiCodeModelSupport()
|
||||
const QString uiHeaderFilePath
|
||||
= QString("%1/ui_%2.h").arg(uiDir, QFileInfo(uiFile->path()).completeBaseName());
|
||||
|
||||
qDebug()<<"code model support for "<<uiFile->path()<<" "<<uiHeaderFilePath;
|
||||
// qDebug()<<"code model support for "<<uiFile->path()<<" "<<uiHeaderFilePath;
|
||||
QMap<QString, Qt4UiCodeModelSupport *>::iterator it = oldCodeModelSupport.find(uiFile->path());
|
||||
if (it != oldCodeModelSupport.end()) {
|
||||
qDebug()<<"updated old codemodelsupport";
|
||||
// qDebug()<<"updated old codemodelsupport";
|
||||
Qt4UiCodeModelSupport *cms = it.value();
|
||||
cms->setFileName(uiHeaderFilePath);
|
||||
m_uiCodeModelSupport.insert(it.key(), cms);
|
||||
oldCodeModelSupport.erase(it);
|
||||
} else {
|
||||
qDebug()<<"adding new codemodelsupport";
|
||||
// qDebug()<<"adding new codemodelsupport";
|
||||
Qt4UiCodeModelSupport *cms = new Qt4UiCodeModelSupport(modelManager, m_project, uiFile->path(), uiHeaderFilePath);
|
||||
m_uiCodeModelSupport.insert(uiFile->path(), cms);
|
||||
modelManager->addEditorSupport(cms);
|
||||
|
||||
@@ -16,13 +16,13 @@ Qt4UiCodeModelSupport::Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface
|
||||
m_fileName(uiHeaderFile),
|
||||
m_updateIncludingFiles(false)
|
||||
{
|
||||
qDebug()<<"ctor Qt4UiCodeModelSupport for"<<m_sourceName;
|
||||
// qDebug()<<"ctor Qt4UiCodeModelSupport for"<<m_sourceName;
|
||||
init();
|
||||
}
|
||||
|
||||
Qt4UiCodeModelSupport::~Qt4UiCodeModelSupport()
|
||||
{
|
||||
qDebug()<<"dtor ~Qt4UiCodeModelSupport for"<<m_sourceName;
|
||||
// qDebug()<<"dtor ~Qt4UiCodeModelSupport for"<<m_sourceName;
|
||||
}
|
||||
|
||||
void Qt4UiCodeModelSupport::init()
|
||||
@@ -33,7 +33,7 @@ void Qt4UiCodeModelSupport::init()
|
||||
if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) {
|
||||
QFile file(m_fileName);
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
qDebug()<<"ui*h file is more recent then source file, using information from ui*h file"<<m_fileName;
|
||||
// qDebug()<<"ui*h file is more recent then source file, using information from ui*h file"<<m_fileName;
|
||||
QTextStream stream(&file);
|
||||
m_contents = stream.readAll().toUtf8();
|
||||
m_cacheTime = uiHeaderTime;
|
||||
@@ -41,17 +41,17 @@ void Qt4UiCodeModelSupport::init()
|
||||
}
|
||||
}
|
||||
|
||||
qDebug()<<"ui*h file not found, or not recent enough, trying to create it on the fly";
|
||||
// qDebug()<<"ui*h file not found, or not recent enough, trying to create it on the fly";
|
||||
QFile file(m_sourceName);
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
QTextStream stream(&file);
|
||||
const QString contents = stream.readAll();
|
||||
if (runUic(contents)) {
|
||||
qDebug()<<"created on the fly";
|
||||
// qDebug()<<"created on the fly";
|
||||
return;
|
||||
} else {
|
||||
// uic run was unsuccesfull
|
||||
qDebug()<<"uic run wasn't succesfull";
|
||||
// qDebug()<<"uic run wasn't succesfull";
|
||||
m_cacheTime = QDateTime();
|
||||
m_contents = QByteArray();
|
||||
// and if the header file wasn't there, next time we need to update
|
||||
@@ -61,7 +61,7 @@ void Qt4UiCodeModelSupport::init()
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
qDebug()<<"Could open "<<m_sourceName<<"needed for the cpp model";
|
||||
// qDebug()<<"Could open "<<m_sourceName<<"needed for the cpp model";
|
||||
m_contents = QByteArray();
|
||||
}
|
||||
}
|
||||
@@ -97,17 +97,13 @@ bool Qt4UiCodeModelSupport::runUic(const QString &ui) const
|
||||
if (uic.waitForFinished()) {
|
||||
m_contents = uic.readAllStandardOutput();
|
||||
m_cacheTime = QDateTime::currentDateTime();
|
||||
// qDebug()<<"\nusing uic from"<<m_project->qtVersion(m_project->activeBuildConfiguration())->uicCommand();
|
||||
// qDebug()<<"resulted in:";
|
||||
// qDebug()<< m_contents;
|
||||
// qDebug()<<"=============================";
|
||||
return true;
|
||||
} else {
|
||||
qDebug()<<"running uic failed"<<" using uic: "<<m_project->qtVersion(m_project->activeBuildConfiguration())->uicCommand();
|
||||
qDebug()<<uic.readAllStandardError();
|
||||
qDebug()<<uic.readAllStandardOutput();
|
||||
qDebug()<<uic.errorString();
|
||||
qDebug()<<uic.error();
|
||||
// qDebug()<<"running uic failed"<<" using uic: "<<m_project->qtVersion(m_project->activeBuildConfiguration())->uicCommand();
|
||||
// qDebug()<<uic.readAllStandardError();
|
||||
// qDebug()<<uic.readAllStandardOutput();
|
||||
// qDebug()<<uic.errorString();
|
||||
// qDebug()<<uic.error();
|
||||
uic.kill();
|
||||
}
|
||||
return false;
|
||||
@@ -115,23 +111,23 @@ bool Qt4UiCodeModelSupport::runUic(const QString &ui) const
|
||||
|
||||
void Qt4UiCodeModelSupport::updateFromEditor(Designer::Internal::FormWindowEditor *fw)
|
||||
{
|
||||
qDebug()<<"Qt4UiCodeModelSupport::updateFromEditor"<<fw;
|
||||
// qDebug()<<"Qt4UiCodeModelSupport::updateFromEditor"<<fw;
|
||||
if (runUic(fw->contents())) {
|
||||
qDebug()<<"runUic: success, updated on the fly";
|
||||
// qDebug()<<"runUic: success, updated on the fly";
|
||||
updateDocument();
|
||||
} else {
|
||||
qDebug()<<"runUic: failed, not updated";
|
||||
// qDebug()<<"runUic: failed, not updated";
|
||||
}
|
||||
}
|
||||
|
||||
void Qt4UiCodeModelSupport::updateFromBuild()
|
||||
{
|
||||
qDebug()<<"Qt4UiCodeModelSupport::updateFromBuild() for file"<<m_sourceName;
|
||||
// qDebug()<<"Qt4UiCodeModelSupport::updateFromBuild() for file"<<m_sourceName;
|
||||
// This is mostly a fall back for the cases when uic couldn't be run
|
||||
// it pays special attention to the case where a ui_*h was newly created
|
||||
QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
|
||||
if (m_cacheTime.isValid() && m_cacheTime >= sourceTime) {
|
||||
qDebug()<<"Cache is still more recent then source";
|
||||
// qDebug()<<"Cache is still more recent then source";
|
||||
return;
|
||||
} else {
|
||||
QFileInfo fi(m_fileName);
|
||||
@@ -139,7 +135,7 @@ void Qt4UiCodeModelSupport::updateFromBuild()
|
||||
if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) {
|
||||
if (m_cacheTime >= uiHeaderTime)
|
||||
return;
|
||||
qDebug()<<"found ui*h updating from it";
|
||||
// qDebug()<<"found ui*h updating from it";
|
||||
|
||||
QFile file(m_fileName);
|
||||
if (file.open(QFile::ReadOnly)) {
|
||||
@@ -151,7 +147,7 @@ void Qt4UiCodeModelSupport::updateFromBuild()
|
||||
}
|
||||
}
|
||||
|
||||
qDebug()<<"ui*h not found or not more recent then source not changing anything";
|
||||
// qDebug()<<"ui*h not found or not more recent then source not changing anything";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user