Results 1 to 6 of 6

Thread: Resource search/lookup tool/script to check completeness and correctness of qrc files

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2006
    Location
    Dresden, Germany
    Posts
    106
    Thanks
    9
    Thanked 12 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Resource search/lookup tool/script to check completeness and correctness of qrc files

    Hi all,

    I have a large project with 200+ resource files (mostly pixmaps) and need to do refactoring/directory structure changes.

    Now my pixmaps are used all over the code base with typical qrc reference paths: ":/master/arrow_16x16/right/background/arrow_right_middle.png", both in cpps and ui-files.

    When I now modify my qrc file and move the referenced pixmaps in the directory structure, I have several situations:

    - pixmap is referenced in qrc and correctly used in the source code
    - source code contains invalid qrc-path (not detected at compile time, and difficult to find through testing)
    - pixmap is referenced in qrc but nowhere used (i.e. unused and could be deleted)
    - pixmap is in directory structure but not (yet) referenced in qrc (i.e. unused and could be deleted)

    Obviously, cases 2 to 4 are suboptimal, yet, it is very time consuming to detect such problems and clean out the code base and directory structure.

    Does anyone know of a tool/script that:

    - scans a base directory of resources
    - reads a project's qrc file (or files)
    - scans the source code (cpp and ui) for string constants with pattern ":/*.png" or any other suitable extension

    and then prints out a nice summary of all resources used and unused and files, i.e. the 4 categories above?

    Thanks for any suggestions,
    Andreas
    Last edited by ghorwin; 25th January 2022 at 07:57.
    Andreas

Similar Threads

  1. How to build a search tool bar like Wireshark
    By leinad in forum Qt Programming
    Replies: 5
    Last Post: 31st January 2020, 17:59
  2. Replies: 1
    Last Post: 28th July 2016, 18:38
  3. how to run a vbs script in resource from inside QT
    By sherifomran in forum Qt Programming
    Replies: 2
    Last Post: 15th September 2013, 11:30
  4. Running a bash script from resource (qrc) file
    By onamatic in forum Qt Programming
    Replies: 4
    Last Post: 3rd February 2012, 10:09
  5. Image resource lookup in OS X
    By stipa in forum Qt Quick
    Replies: 1
    Last Post: 1st December 2010, 08:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.