Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Error when lupdate calling.
Qt 6.11 is out! See what's new in the release blog

Error when lupdate calling.

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 4.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anticross
    wrote on last edited by
    #1

    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

    Stacktrace:
    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]

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Anticross
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        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.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Anticross
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Duck
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved