跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. Qt Development
  3. General and Desktop
  4. Suggestion in Qt Creator content assist for QScopedPointer
Forum Updated to NodeBB v4.3 + New Features

Suggestion in Qt Creator content assist for QScopedPointer

已排程 已置頂 已鎖定 已移動 General and Desktop
27 貼文 9 Posters 15.2k 瀏覽 1 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • T 離線
    T 離線
    tobias.hunger
    寫於 最後由 編輯
    #18

    Well, if somebody really wants this, then please file a feature request in our "issue tracker":http://bugreports.qt.nokia.com/.

    It will be forgotten when it stays in the forums.

    1 條回覆 最後回覆
    0
    • G 離線
      G 離線
      goetz
      寫於 最後由 編輯
      #19

      [quote author="Tobias Hunger" date="1294074762"]Well, if somebody really wants this, then please file a feature request in our "issue tracker":http://bugreports.qt.nokia.com/.

      It will be forgotten when it stays in the forums.[/quote]

      That has already been done: "QTBUG-16391":http://bugreports.qt.nokia.com/browse/QTBUG-16391, unfortunately not in the Qt Creator project of the tracker, but some of the Trolls will move it?

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

      1 條回覆 最後回覆
      0
      • P 離線
        P 離線
        Panke
        寫於 最後由 編輯
        #20

        [quote author="Volker" date="1294062364"]Well written, Zlatomir. It's exactly the point. And while I really do like the . to -> conversion on plain old pointers, I would argue against it for smart pointers. I would not like it to be changed afterwards (from xyz.hori to xyz->hori) because I do not like that code, that my cursor is not on, is changed automatically.

        [EDIT: fixed Textile markup][/quote]

        You don't really need a feature like this -- you could use ed after all. Just kidding. I would like the feature and I'm sure it would do no harm. It might change code your cursor is not on, that's true. And I agree that this is in general a bad idea. But it is also true, that the code it changes is 4 characters left of your cursor, so no problem here.

        I don't miss this feature though and their are improvements that would have a bigger impact on the ways we develop our applications. Maybe this "this":http://developer.qt.nokia.com/forums/viewthread/795/ combined with model checker :-)

        1 條回覆 最後回覆
        0
        • ZlatomirZ 離線
          ZlatomirZ 離線
          Zlatomir
          寫於 最後由 編輯
          #21

          You do realize that my_object pointed by an QScopedPointer can have, for example, a reset(...) member function?
          In the situation described above... if i write ptr.reset() witch reset do i want to call? the member of the pointer or the one member of my_object?

          This leads to confusion, those two are two different operators and they should remain two different operators (like this two: * and + from the "sarcasm" example) and you as the programmer should decide which one do you need... and use that one.

          https://forum.qt.io/category/41/romanian

          1 條回覆 最後回覆
          0
          • A 離線
            A 離線
            ashwindas
            寫於 最後由 編輯
            #22

            [quote author="Zlatomir" date="1294092791"]//sarcasm on
            Hey, i would really like a feature like this:
            if i have two ints like: int x,y;
            if i write: x*y;
            i want Creator to decide (form the position of the Sun related to Northern Star) if i really want multiply or addition and if i wanted the result saved in a file or send over the network... or send an e-mail to my boss saying: "I quit my job!!!"

            Can i get the feature described above??? pleaseeee.... or at least Creator could do is guess what application i need and write it for me...

            //sarcasm off

            You do realize that my_object pointed by an QScopedPointer can have, for example, a reset(...) member function?
            In the situation described above... if i write ptr.reset() witch reset do i want to call? the member of the pointer or the one member of my_object?

            This leads to confusion, those two are two different operators and they should remain two different operators (like this two: * and + from the "sarcasm" example) and you as the programmer should decide which one do you need... and use that one. [/quote]

            Thats a bit of sarcasm overdose don't you think? Was that required here?

            Please read all the above comments in this thread before you comment again. The problems which you are talking about are already talked about.

            1 條回覆 最後回覆
            0
            • ZlatomirZ 離線
              ZlatomirZ 離線
              Zlatomir
              寫於 最後由 編輯
              #23

              If i offended someone, i apologize.

              I have read the topic, if you look at the names who answered you will see that i was the first guy that answered and also offered "technical" arguments of why this is not a good idea, and about the sarcasm, again sorry it wasn't meant to offend anyone.
              Also the argument with member function with same signature as the another member function of the smart-pointer wasn't said before my previous post.
              And the second idea you got also can have unwanted consequences for those using pointer arithmetic (the idea with - after pointerName)

              Also the "arrow" operator: ptrName->member is already a replacement for the longer version: (*ptrName).member

              Again sorry, because you feel offended, the sarcasm was not meant to offend you, was meant to prove you that two different operators are needed to remain different and this is not a good idea.

              Please don't feel offended, just read the arguments against your idea and understand what we are trying to say.

              LE: i have deleted the sarcasm part from my previous post, because you obviously was offended by it

              https://forum.qt.io/category/41/romanian

              1 條回覆 最後回覆
              0
              • D 離線
                D 離線
                Duck
                寫於 最後由 編輯
                #24

                [quote author="Ashwin Das" date="1294104294"]
                [quote author="Zlatomir" date="1294092791"]//sarcasm on
                Can i get the feature described above??? pleaseeee.... or at least Creator could do is guess what application i need and write it for me...

                //sarcasm off

                This leads to confusion, those two are two different operators and they should remain two different operators (like this two: * and + from the "sarcasm" example) and you as the programmer should decide which one do you need... and use that one. [/quote]

                Thats a bit of sarcasm overdose don't you think? Was that required here? ...

                [/quote]

                No, it was not overdone. It was exactly to the point. The suggested feature does not significantly reduce the amount of typing. Moreover, it is obviously wrong in some cases and will most notably hurt people who are typing properly.

                There is nothing wrong with wasting time discussing such a proposal here, but what really puts me off is that people suggest to file this as feature request on the official bugtracker since this only wastes some developer's time to close it as "Invalid" or "Out of scope". This is not helpful.

                1 條回覆 最後回覆
                0
                • G 離線
                  G 離線
                  goetz
                  寫於 最後由 編輯
                  #25

                  [quote author="Duck" date="1294484959"]There is nothing wrong with wasting time discussing such a proposal here, but what really puts me off is that people suggest to file this as feature request on the official bugtracker since this only wastes some developer's time to close it as "Invalid" or "Out of scope". This is not helpful.
                  [/quote]

                  Tobias, the guy that requested the bug report, is actually one of the developers of Qt Creator at Nokia. I'm quite sure he's not yelling for unneeded work. And being in the bug tracker and closed immediately is not a bad thing! At least it is documented publicly that something was discussed, but will not be implemented.

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

                  1 條回覆 最後回覆
                  0
                  • N 離線
                    N 離線
                    nerdoc
                    寫於 最後由 編輯
                    #26

                    Another problem would be if you create a QScopedPointer of a class that has a reset() function already:
                    @
                    class MyClass() {
                    void reset();
                    }

                    ...
                    QScopedPointer<MyClass> ptr;
                    ptr.reset();
                    ptr->reset(); // these are different things, QtC would be confused ;-)
                    @

                    1 條回覆 最後回覆
                    0
                    • A 離線
                      A 離線
                      andre
                      寫於 最後由 編輯
                      #27

                      [quote author="droetker" date="1357276914"]Another problem would be if you create a QScopedPointer of a class that has a reset() function already:
                      @
                      class MyClass() {
                      void reset();
                      }

                      ...
                      QScopedPointer<MyClass> ptr;
                      ptr.reset();
                      ptr->reset(); // these are different things, QtC would be confused ;-)
                      @[/quote]

                      That was already said "here":/forums/viewreply/18726/ almost a year ago...

                      1 條回覆 最後回覆
                      0

                      • 登入

                      • Login or register to search.
                      • 第一個貼文
                        最後的貼文
                      0
                      • 版面
                      • 最新
                      • 標籤
                      • 熱門
                      • 使用者
                      • 群組
                      • 搜尋
                      • Get Qt Extensions
                      • Unsolved