On Sun, Apr 17, 2011 at 8:52 AM, Richard Shaw wrote:
On Sun, Apr 17, 2011 at 12:53 AM, Kevin Kofler wrote:
> 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'
This is C++ rather than C. You also need to update the corresponding
header file, possibly T_configMenu.h
Look for class "ADM_QconfigMenu" in the header file. It will contain
the member prototypes. You need to update the function
selectConfiguration() the same way you updated it in the
implementation file T_configMenu.cpp .
Orcan