Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCreator project with folder named new
Forum Updated to NodeBB v4.3 + New Features

QtCreator project with folder named new

Scheduled Pinned Locked Moved Unsolved General and Desktop
qmake
7 Posts 2 Posters 967 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.
  • D Offline
    D Offline
    dahman
    wrote on last edited by
    #1

    I noticed a strange behaviour with qmake, using Qtcreator.
    I have a project with many files allocated in different folders.
    One of these folders is named "new".
    The strange thing is, every time I edit some file located in this folder,
    the whole project is recompiled, instead of recompiling only the edited file (.cpp file).

    Changing other files on other folders, the behaviour is correct.
    Renaming the new folder, solve the problem.

    A non-Qt project does't have this issue.

    Actually I am using Qt5.7.1 with MinGW 5.3.0 on windows7.

    It is very easy to reproduce.
    Create a new Qt project.
    Add a new file and put it in a folder named new.
    After compiling the whole project, try to change the new added file.

    is it a known problem?

    Thank you for any hint

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      It's not something I have seen reported before.
      Also, i tried to reproduce in a new project using
      your step by step but it only compiles test.cpp in the new folder.

      Could you perhaps post your .pro file?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dahman
        wrote on last edited by
        #3

        Thanks for the replay.

        This is my .pro file without any change, copied and pasted.

        #-------------------------------------------------
        #
        # Project created by QtCreator 2019-03-19T15:43:18
        #
        #-------------------------------------------------
        
        QT       += core gui
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        
        TARGET = prova_new
        TEMPLATE = app
        
        # The following define makes your compiler emit warnings if you use
        # any feature of Qt which has been marked as deprecated (the exact warnings
        # depend on your compiler). Please consult the documentation of the
        # deprecated API in order to know how to port your code away from it.
        DEFINES += QT_DEPRECATED_WARNINGS
        
        # You can also make your code fail to compile if you use deprecated APIs.
        # In order to do so, uncomment the following line.
        # You can also select to disable deprecated APIs only up to a certain version of Qt.
        #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
        
        CONFIG += c++11
        
        SOURCES += \
                main.cpp \
                mainwindow.cpp \
            new/dummy.cpp
        
        HEADERS += \
                mainwindow.h \
            new/dummy.h
        
        FORMS += \
                mainwindow.ui
        
        # Default rules for deployment.
        qnx: target.path = /tmp/$${TARGET}/bin
        else: unix:!android: target.path = /opt/$${TARGET}/bin
        !isEmpty(target.path): INSTALLS += target
        
        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Super.
          Well, it looks exactly like my test one.
          What do you have in dummy.h / cpp ?
          Also are they include in mainwindow or main ?

          it could be a bug in Qt5.7.1 as im testing with Qt5.12

          You must use such older version ?

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

            In dummy.h and dummy.cpp, (nothig special)

            #ifndef DUMMY_H
            #define DUMMY_H
            
            
            class Dummy
            {
            public:
                Dummy();
            };
            
            #endif // DUMMY_H
            
            #include "dummy.h"
            
            Dummy::Dummy()
            {
            
            }
            

            main.cpp

            #include "mainwindow.h"
            #include <QApplication>
            
            int main(int argc, char *argv[])
            {
                QApplication a(argc, argv);
                MainWindow w;
                w.show();
            
                return a.exec();
            }
            

            My project is an application that we use at work and many users have Windows XP.
            Unfortunately, Qt5.12 is not compatible with Windows XP.

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              Ahh, the good old Windows XP. Not as stoned dead as they want to believe :)
              I would check https://bugreports.qt.io/issues/ to see if it has been reported.
              Your pro file look pretty normal.

              Its only when folder is named new ?

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dahman
                wrote on last edited by
                #7

                If I rename new folder in new_old, for example, the problem disappears.
                I also tried, Qt5.8, already installed in my system, same problem.

                Maybe tomorow, I will try Qt5.12 and let you know.

                1 Reply Last reply
                1

                • Login

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