QStringBuilder

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024

ความคิดเห็น • 8

  • @piergiorgiovalli5220
    @piergiorgiovalli5220 2 ปีที่แล้ว

    Stanlio e Ollio was a big duo,now there is a a new duo for technology Jesper and Angelo :-)

    • @blackiedk
      @blackiedk 2 ปีที่แล้ว

      I can see why you would compare me to the fat guy with a temper, but Peppe really isn't that clumsy :-)

    • @piergiorgiovalli5220
      @piergiorgiovalli5220 2 ปีที่แล้ว

      @@blackiedk Sorry you misunderstood my comment. Stallio and Olio were a great close-knit duo, they did great things together. I have compared you because together you can see that you work well together. It was not my intention to offend.

    • @blackiedk
      @blackiedk 2 ปีที่แล้ว +1

      @@piergiorgiovalli5220 No offense taken, I was just playing along on your joke. They indeed were very great actors, and adding Peppe to QWAM from time to time indeed does add a lot of value.

  • @ChiconDent
    @ChiconDent 2 ปีที่แล้ว

    Thank you for another great video! Question: If directory, name, and extension are existing QStrings, how does the efficiency of QStringLiteral("%1/%2.%3").arg(directory, name, extension) compare to directory % "/" % name % "." % extension?

    • @giuseppedangelo3015
      @giuseppedangelo3015 ปีที่แล้ว

      Hi, It's going to be the same (one allocation). Of course formatting via arg() offers some extra flexibility (e.g. easier to support translations). When in doubt, profile :-)

  •  2 ปีที่แล้ว

    At 5:22 that shoud be with a + sign !? like: DEFINES += QT_USE_STRINGBUILDER ?

    • @blackiedk
      @blackiedk 2 ปีที่แล้ว +2

      *= means that it will add it, only if it isn't in the list already. So had you written += instead you would risk to have it multiple times. Not a big deal your compiler will cope, just makes it harder to read your compiler output.