[PATCH] Ignore QWebView in Android

Dirk Hohndel dirk at hohndel.org
Tue Jan 13 10:11:27 PST 2015


On Tue, Jan 13, 2015 at 06:20:18PM +0100, Anton Lundin wrote:
> On 13 January, 2015 - Joseph W. Joshua wrote:
> 
> > Ignore QWebView instances in the preferences dialog when compiling under
> > Android, as QWebView is not yet supported under Android.
> 
> Nice. I was planning on doing something like this, but i got lazy.
> Thanks for stepping up and doing it.

Thanks from here as well.

> > @@ -20,6 +24,15 @@ PreferencesDialog *PreferencesDialog::instance()
> >  PreferencesDialog::PreferencesDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
> >  {
> >  	ui.setupUi(this);
> > +#ifndef Q_OS_ANDROID
> > +	facebookWebView = new QWebView(this);
> > +	QVBoxLayout fbLayout(ui.page_6);
> > +	fbLayout.addWidget(facebookWebView);
> > +	fbLayout.addWidget(ui.fbConnected);
> > +	ui.page_6->setLayout(&fbLayout);
> 
> Can you rename page_6 to something better?

Definitely. :-)

> > +#else
> > +	delete ui.listWidget->item(5);
> > +#endif
> 
> Is there a better way than addressing it as 5?
> 
> Feels like that one can break as soon as someone touches the ui file
> again.

Walk the list of items in a loop and check their name and then make sure
in the .ui file that they have a sensible name. And with that you can
easily delete the right one :-)

/D


More information about the subsurface mailing list