avidemux for devel/F-15: Is there a C programmer in the house?
Richard Shaw
hobbes1069 at gmail.com
Sun Apr 17 14:52:04 CEST 2011
On Sun, Apr 17, 2011 at 12:53 AM, Kevin Kofler <kevin.kofler at chello.at> wrote:
> Richard Shaw wrote:
>> /builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:213:69:
>> error: taking address of temporary [-fpermissive]
>> /builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:319:54:
>> error: taking address of temporary [-fpermissive]
>> /builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:359:54:
>> error: taking address of temporary [-fpermissive]
>
> The error here is that:
> bool ADM_QconfigMenu::selectConfiguration(QString *selectFile, ConfigMenuType configurationType)
> takes a QString *. It should really be taking a const QString &. Change
> QString *selectFile to const QString &selectFile in that function's prototype
> and remove the & from the 3 calls to that function.
I think I did it right but I ran into another error. Here's the lines
as changed:
141: bool ADM_QconfigMenu::selectConfiguration(const QString
&selectFile, ConfigMenuType configurationType)
213: selectConfiguration(QFileInfo(configFileName).completeBaseName(),
CONFIG_MENU_USER);
319: configMenu->selectConfiguration(QString(configName), *configType);
359: configMenu->selectConfiguration(QString(configName), *configType);
Did I make the changes correctly?
I'll paste the new errors at the bottom.
> That function also compares the result of QComboBox::itemText, which is a
> QString, with selectFile. I have no idea how that works. If you change the type
> of selectFile to const QString &, it should do the right thing.
I somewhat understanding what you're saying but I'm not up on C enough
to quite apply your suggested changes to the code.
Thanks,
Richard
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:141:7:
error: prototype for 'bool
ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(const QString&,
ConfigMenuType)' does not match any in class
'ADM_Qt4Factory::ADM_QconfigMenu'
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
error: candidate is: bool
ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString*,
ConfigMenuType)
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:
In member function 'void
ADM_Qt4Factory::ADM_QconfigMenu::saveAsClicked(bool)':
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:200:31:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:213:87:
error: no matching function for call to
'ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString,
ConfigMenuType)'
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:213:87:
note: candidate is:
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
note: bool ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString*,
ConfigMenuType)
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
note: no known conversion for argument 1 from 'QString' to
'QString*'
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:
In member function 'void
ADM_Qt4Factory::ADM_QconfigMenu::comboboxIndexChanged(int)':
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:226:29:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:233:31:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:
In member function 'virtual void
ADM_Qt4Factory::diaElemConfigMenu::updateMe()':
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:319:67:
error: no matching function for call to
'ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString,
ConfigMenuType&)'
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:319:67:
note: candidate is:
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
note: bool ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString*,
ConfigMenuType)
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
note: no known conversion for argument 1 from 'QString' to
'QString*'
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:
In member function 'virtual void
ADM_Qt4Factory::diaElemConfigMenu::finalize()':
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:359:67:
error: no matching function for call to
'ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString,
ConfigMenuType&)'
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.cpp:359:67:
note: candidate is:
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
note: bool ADM_Qt4Factory::ADM_QconfigMenu::selectConfiguration(QString*,
ConfigMenuType)
/builddir/build/BUILD/avidemux_2.5.4/avidemux/ADM_UIs/ADM_QT4/src/T_configMenu.h:49:8:
note: no known conversion for argument 1 from 'QString' to
'QString*'
More information about the rpmfusion-developers
mailing list