kconfiggroup and unhandled types
Thomas Braxton
kde.braxton at gmail.com
Mon Oct 29 08:59:32 GMT 2007
On 10/29/07, Thiago Macieira <thiago at kde.org> wrote:
>
> Em Monday 29 October 2007 05:20:34 Aaron J. Seigo escreveu:
> > were there specific reasons for using kFatal that warrant keeping it
> that
> > way?
>
> I agree that kWarning is probably better.
>
> If you're debugging your code and you want to fix your warnings, do this:
>
> export QT_FATAL_WARNINGS=1
>
> This will generate core dumps when a warning is triggered. The same
> behaviour
> as a kFatal, that is.
I didn't know about that. So, how about this patch?
Index: kconfiggroup.cpp
===================================================================
--- kconfiggroup.cpp (revision 730534)
+++ kconfiggroup.cpp (working copy)
@@ -346,7 +346,7 @@
}
case QVariant::Color:
case QVariant::Font:
- kFatal() << "KConfigGroup::readEntry was passed GUI type '"
+ kWarning() << "KConfigGroup::readEntry was passed GUI type '"
<< aDefault.typeName()
<< "' but kdeui isn't linked! If it is linked to your
program, "
"this is a platform bug. Please inform the KDE
developers" << endl;
@@ -362,7 +362,7 @@
break;
}
- kFatal() << "unhandled type " << aDefault.typeName();
+ kWarning() << "unhandled type " << aDefault.typeName();
return QVariant();
}
@@ -1103,7 +1103,7 @@
case QVariant::Color:
case QVariant::Font:
- kFatal() << "KConfigGroup::writeEntry was passed GUI type '"
+ kWarning() << "KConfigGroup::writeEntry was passed GUI type '"
<< value.typeName()
<< "' but kdeui isn't linked! If it is linked to your
program, this is a platform bug. "
"Please inform the KDE developers" << endl;
@@ -1116,7 +1116,7 @@
data = qvariant_cast<KUrl>(value).url().toUtf8();
break;
}
- kFatal() << "KConfigGroup::writeEntry - unhandled type" <<
value.typeName() << "in group" << name();
+ kWarning() << "KConfigGroup::writeEntry - unhandled type" <<
value.typeName() << "in group" << name();
}
writeEntry(key, data, flags);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071029/bb4de831/attachment.htm>
More information about the kde-core-devel
mailing list