Error when lupdate calling.

  • When I start lupdate on my *.ts file in qt project I have such error:

    Index was out of range. Must be non-negative and less then the size of the collection.
    Parameter name: index

    at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
    at System.ThrowHelper.ThrowArgumentOutOfRangeException()
    at System.Collections.Generic.List' 1.set_Item(Int32 index, T value)
    at Nokia.QtProjectLib.ProgectExporter.ConvertFilesToFullPath(List' 1 files, String path)
    at Qt4VSAddin.Translation.RunlUpdate(VCFile vcFile, Project pro)
    at Qt4VSAddin.Translation.RunlUpdate(VCFile[] vcFile, Project pro)
    at Qt4VSAddin.ConnectExec(String commandName, vsCommandExecOption executeOption, Object& varIn, Object& varOut, Boolean& handled)

    Also I find that if i delete one of my *.ui files in project and recompile it I have no error. What it can be ?

    [EDIT: code formatting for stack trace, Volker]

  • Can this error happens when I have too match files to translate(more than 100 maybe) ?

  • Does it work if you call lupdate on a cmd shell. From the stack trace it appears, that you call it from the visual studio addin.

  • I don't try to make lupdate with all the list of my files needed to be translated. I make some simple console application which stores all *.cpp, *.ui and *.h files(founded in *.vcproj file) in list file and then run lupdate using this list file. And now It's work correctly. Of course using shell. I make some batch file to do some automation of making list and then lupdating.

  • You can create a dummy .pro file using "qmake -project" and run lupdate on that. That would also let you specify your target languages.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.