[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Internatinalization error: i18n was not declared in the scope.
From:       Christoph Feck <cfeck () kde ! org>
Date:       2015-01-27 15:53:01
Message-ID: 201501271653.01586.cfeck () kde ! org
[Download RAW message or body]

On Tuesday 27 January 2015 16:46:13 Thomas Lübking wrote:
> On Dienstag, 27. Januar 2015 16:42:49 CEST, anu mittal wrote:
> > It then says
> > error: no matching function for call to
> > ‘QMessageBox::warning(int, QString)'
> > 
> >          QMessageBox::warning(0,i18n("
> > 
> > Cannot save to the specified file."));
> 
> Not during compilation, but on configuration.
> If you add those lines to CMakeLists.txt, the lib and headers are
> searched on disk and if not found, the configuration step exits
> with an error, what basically means that the KLocalizedString
> frameworks module is simply not installed in the target
> (include+link) path.
> 
> As a result the header inclusion
> #include <klocalizedstring.h>
> fails and ultimately the function is of course not found.

Given the error message, the compiler now knows that i18n() returns a 
QString, so that part about KLocalizedString is fine. Still, you have 
to check if the QMessageBox call was ported from KMessageBox, and some 
arguments must be changed, or the initial "0" was actually a pointer, 
and you should replace it with the parent widget or whatever is 
expected there.

Christoph Feck (kdepepo)

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic