[mythtv] Re: compiling mythtv frontend for cygwin
Mario L
superm1 at gmail.com
Thu Oct 14 21:02:41 UTC 2004
I went a little further into this and it isn't a null string being
returned, the object does exist. I am really starting to think that
we might have hit some sort of QT bug here:
QStringList verboseOpts;
verboseOpts =
QStringList::split(',',a.argv()[argpos+1],true);
++argpos;
if (&verboseOpts == NULL)
VERBOSE(VB_ALL, "null stringlist");
else
{
VERBOSE(VB_ALL,&verboseOpts);
VERBOSE(VB_ALL,verboseOpts.size());
VERBOSE(VB_ALL,"empty? " + verboseOpts.empty());
if (verboseOpts.front() == NULL)
VERBOSE(VB_ALL, "null iterator");
else
VERBOSE(VB_ALL, "crazy iterator");
}
QStringList::Iterator it = verboseOpts.begin();
VERBOSE(VB_ALL,"it has begun");
for (QStringList::Iterator it = verboseOpts.begin();
it != verboseOpts.end(); ++it )
Adding those extra output lines gets me this:
$ /c/myth/mythfrontend.exe -v all
2004-10-14 15:57:08 0x23fdb8
2004-10-14 15:57:08 213979536
2004-10-14 15:57:08 empty?
Which does prove that it isn't a NULL QStringList, and also the fact
that the iterator list is fairly large, a little too large if i would
say. Debugging iterator stuff in QT is not going to be a very
enjoyable task I'll recon. I'm going to rebuild my QT later tonight
with debug support, and see if later on after work I can try'n use gdb
to learn a bit about the problem.
On Thu, 14 Oct 2004 15:43:17 -0500, Mario L <superm1 at gmail.com> wrote:
> Well but that theory seems to be broken because the same thing happens
> in globalsettings.cpp, unless that is one problem and this is another
> completely unrelated problem:
>
> class StyleSetting: public ComboBoxSetting, public GlobalSetting {
> public:
> StyleSetting():
> GlobalSetting("Style") {
> setLabel(QObject::tr("Qt Style"));
> fillSelections();
> setHelpText(QObject::tr("At startup, MythTV will change the Qt "
> "widget style to this setting. If \"Desktop Style\" "
> "is selected, MythTV will use the existing desktop "
> "setting."));
> };
>
> void fillSelections(void) {
> clearSelections();
> addSelection(QObject::tr("Desktop Style"), "");
> QStyleFactory factory;
> QStringList list = factory.keys();
> QStringList::iterator iter = list.begin();
> VERBOSE(VB_ALL,"iteration started");
> for (; iter != list.end(); iter++ )
> addSelection(*iter);
> };
>
> void load(QSqlDatabase *db) {
> fillSelections();
> GlobalSetting::load(db);
> };
> };
>
> If you look further into that keys function, it must yield something
> out, each of the entries are manually added in:
>
> QStringList QStyleFactory::keys()
> {
> QStringList list;
> #ifndef QT_NO_COMPONENT
> if ( !instance )
> instance = new QStyleFactoryPrivate;
>
> list = QStyleFactoryPrivate::manager->featureList();
> #endif //QT_NO_COMPONENT
>
> #ifndef QT_NO_STYLE_WINDOWS
> if ( !list.contains( "Windows" ) )
> list << "Windows";
> #endif
> #ifndef QT_NO_STYLE_WINDOWSXP
> if ( !list.contains( "WindowsXP" ) && QWindowsXPStyle::resolveSymbols() )
> list << "WindowsXP";
> #endif
> #ifndef QT_NO_STYLE_MOTIF
> if ( !list.contains( "Motif" ) )
> list << "Motif";
> #endif
> #ifndef QT_NO_STYLE_CDE
> if ( !list.contains( "CDE" ) )
> list << "CDE";
> #endif
> #ifndef QT_NO_STYLE_MOTIFPLUS
> if ( !list.contains( "MotifPlus" ) )
> list << "MotifPlus";
> #endif
> #ifndef QT_NO_STYLE_PLATINUM
> if ( !list.contains( "Platinum" ) )
> list << "Platinum";
> #endif
> #ifndef QT_NO_STYLE_SGI
> if ( !list.contains( "SGI" ) )
> list << "SGI";
> #endif
> #ifndef QT_NO_STYLE_COMPACT
> if ( !list.contains( "Compact" ) )
> list << "Compact";
> #endif
> #ifndef QT_NO_STYLE_AQUA
> if ( !list.contains( "Aqua" ) )
> list << "Aqua";
> #endif
> #if !defined( QT_NO_STYLE_MAC ) && defined( Q_WS_MAC )
> QString mstyle = "Macintosh";
> Collection c = NewCollection();
> if (c) {
> GetTheme(c);
> Str255 str;
> long int s = 256;
> if(!GetCollectionItem(c, kThemeNameTag, 0, &s, &str))
> mstyle += " (" + p2qstring(str) + ")";
> }
> if (!list.contains(mstyle))
> list << mstyle;
> DisposeCollection(c);
> #endif
>
> return list;
> }
>
More information about the mythtv-dev
mailing list