forked from qt-creator/qt-creator
Fixes: Unified debug enum in the designer plugin
This commit is contained in:
@@ -53,9 +53,6 @@ using namespace Designer::Internal;
|
||||
using namespace Designer::Constants;
|
||||
using namespace SharedTools;
|
||||
|
||||
enum { debugFormWindowFile = 0 };
|
||||
|
||||
|
||||
FormWindowFile::FormWindowFile(QDesignerFormWindowInterface *form, QObject *parent)
|
||||
: Core::IFile(parent),
|
||||
m_mimeType(QLatin1String(FORM_MIMETYPE)),
|
||||
@@ -67,8 +64,8 @@ bool FormWindowFile::save(const QString &name /*= QString()*/)
|
||||
{
|
||||
const QString actualName = name.isEmpty() ? fileName() : name;
|
||||
|
||||
if (debugFormWindowFile)
|
||||
qDebug() << "FormWindowFile::save" << name << "->" << actualName;
|
||||
if (Designer::Constants::Internal::debug)
|
||||
qDebug() << Q_FUNC_INFO << name << "->" << actualName;
|
||||
|
||||
if (actualName.isEmpty())
|
||||
return false;
|
||||
@@ -118,8 +115,8 @@ bool FormWindowFile::isSaveAsAllowed() const
|
||||
|
||||
void FormWindowFile::modified(Core::IFile::ReloadBehavior *behavior)
|
||||
{
|
||||
if (debugFormWindowFile)
|
||||
qDebug() << "FormWindowFile::modified" << m_fileName << *behavior;
|
||||
if (Designer::Constants::Internal::debug)
|
||||
qDebug() << Q_FUNC_INFO << m_fileName << *behavior;
|
||||
|
||||
switch (*behavior) {
|
||||
case Core::IFile::ReloadNone:
|
||||
@@ -157,8 +154,8 @@ QString FormWindowFile::defaultPath() const
|
||||
|
||||
void FormWindowFile::setSuggestedFileName(const QString &fileName)
|
||||
{
|
||||
if (debugFormWindowFile)
|
||||
qDebug() << "FormWindowFile:setSuggestedFileName" << m_fileName << fileName;
|
||||
if (Designer::Constants::Internal::debug)
|
||||
qDebug() << Q_FUNC_INFO << m_fileName << fileName;
|
||||
|
||||
m_suggestedName = fileName;
|
||||
}
|
||||
@@ -175,8 +172,8 @@ QString FormWindowFile::mimeType() const
|
||||
|
||||
bool FormWindowFile::writeFile(const QString &fileName, QString &errorString) const
|
||||
{
|
||||
if (debugFormWindowFile)
|
||||
qDebug() << "FormWindowFile::writeFile" << m_fileName << fileName;
|
||||
if (Designer::Constants::Internal::debug)
|
||||
qDebug() << Q_FUNC_INFO << m_fileName << fileName;
|
||||
|
||||
QFile file(fileName);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate)) {
|
||||
|
||||
Reference in New Issue
Block a user