inappropriate use of preprocessor conditionals in headerfile used by moc-qt4
Qt4's moc compiler does not look at preprocessor conditionals to include or exclude conditional code. Instead, it generates code that references all member functions, whether they're defined in the accompanying .cpp file or not. Platform specific slots or signals must thus be defined in separate header files.
Indeed, building the Qt4 plugin on OS X (where the searchlineedit widget attempts to use the NSSearchField class) leads to linker errors:
Undefined symbols for architecture x86_64: "SearchLineEdit::SearchLineEdit(QWidget*)", referenced from: PrefsDialog::setAdvanced() in libqt4_plugin_la-preferences.o PluginTab::PluginTab(intf_thread_t*) in libqt4_plugin_la-plugins.o AddonsTab::AddonsTab(intf_thread_t*) in libqt4_plugin_la-plugins.o KeySelectorControl::KeySelectorControl(vlc_object_t*, module_config_t*, QWidget*) in libqt4_plugin_la-preferences_widgets.o PlaylistWidget::PlaylistWidget(intf_thread_t*, QWidget*) in libqt4_plugin_la-playlist.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:2012: recipe for target 'libqt4_plugin.la' failed
I'm attaching a very crude patch that comments out the platform-specific (experimental?) code.