Skip to main content
Code Review

Return to Revisions

2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

As you're storing the whole result into memory anyway for display in a text editor (so you're not expecting to load hundreds of MB of text), why not just use what Qt provides to read the entire file into a string in one call?

It's probably more than enough optimized for general purpose usage. Displaying the entire result in the editor might also be faster than constantly appending parts.

I also see that you're using the C API for opening the file (which is never closed) and then passing it to Qt. Qt has QFile for this, as shown in the link mentioned above.

D. Jurcau
  • 3.1k
  • 13
  • 21
default

AltStyle によって変換されたページ (->オリジナル) /