use DISTFILES instead of OTHER_FILES in docs, templates, and editors

the latter variable is entirely meaningless to qmake and should have
never been recognized by creator. unfortunately, qmake's dist target
wasn't very useful before qt 5.4, so it didn't occur to anybody to
actually use the variable associated with it, even though it is
semantically exactly the right thing.

Change-Id: I249857f54fdc38fb5ecac0f608e5f4140624c23c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
Oswald Buddenhagen
2014-08-06 15:07:33 +02:00
parent 3e4f17c164
commit df1f576666
11 changed files with 20 additions and 19 deletions

View File

@@ -86,7 +86,7 @@
\li Select the \gui {Use file defined in project files} option \li Select the \gui {Use file defined in project files} option
to use the configuration file defined in the qmake to use the configuration file defined in the qmake
OTHER_FILES variable as the configuration file for the DISTFILES variable as the configuration file for the
selected tool. selected tool.
\li Select the \gui {Use $HOME} option to use the specified file \li Select the \gui {Use $HOME} option to use the specified file

View File

@@ -2317,8 +2317,9 @@
\endlist \endlist
If locator does not find some files, you can add them to the \c OTHER_FILES If locator does not find some files, you can add them to the \c DISTFILES
variable in the .pro file to make them known to \QC. variable in the .pro file to include them into the distribution tarball
of your project and thus make them known to \QC as well.
\section1 Configuring Locator Filters \section1 Configuring Locator Filters

View File

@@ -199,10 +199,10 @@
\endlist \endlist
You can make additional files known to \QC, so that they become visible in Files that are not sources or data can be still included into a project's
the \gui Projects view and known to the locator and search, but do not distribution tarball by adding their paths to the \c DISTFILES variable in
affect the build system. Add the paths to the files to the \c OTHER_FILES the .pro file. This way they also become known to \QC, so that they are
variable in the .pro file. visible in the \gui Projects view and are known to the locator and search.
\section2 Viewing the File System \section2 Viewing the File System

View File

@@ -340,7 +340,7 @@
\QC determines whether to display files from the project folder \QC determines whether to display files from the project folder
in the \gui Projects pane depending on the file type (.pro, .pri, .cpp, in the \gui Projects pane depending on the file type (.pro, .pri, .cpp,
.h, .qrc, and so on). To display other types of files, edit the .h, .qrc, and so on). To display other types of files, edit the
project file. Add filenames as values of the \c {OTHER_FILES} variable. project file. Add filenames as values of the \c {DISTFILES} variable.
You can also use wildcards. You can also use wildcards.
For example, the following code specifies that text files are displayed For example, the following code specifies that text files are displayed
@@ -348,7 +348,7 @@
\code \code
OTHER_FILES += *.txt DISTFILES += *.txt
\endcode \endcode

View File

@@ -10,7 +10,7 @@ SOURCES += \
HEADERS += \ HEADERS += \
src/applicationui.%CppHeaderSuffix% \ src/applicationui.%CppHeaderSuffix% \
OTHER_FILES += \ DISTFILES += \
bar-descriptor.xml \ bar-descriptor.xml \
assets/main.qml \ assets/main.qml \

View File

@@ -15,7 +15,7 @@ HEADERS += \
%ProjectName:l%_plugin.%CppHeaderSuffix% \ %ProjectName:l%_plugin.%CppHeaderSuffix% \
%ObjectName:l%.%CppHeaderSuffix% %ObjectName:l%.%CppHeaderSuffix%
OTHER_FILES = qmldir DISTFILES = qmldir
!equals(_PRO_FILE_PWD_, $$OUT_PWD) { !equals(_PRO_FILE_PWD_, $$OUT_PWD) {
copy_qmldir.target = $$OUT_PWD/qmldir copy_qmldir.target = $$OUT_PWD/qmldir

View File

@@ -15,7 +15,7 @@ HEADERS += \
%ProjectName:l%_plugin.%CppHeaderSuffix% \ %ProjectName:l%_plugin.%CppHeaderSuffix% \
%ObjectName:l%.%CppHeaderSuffix% %ObjectName:l%.%CppHeaderSuffix%
OTHER_FILES = qmldir DISTFILES = qmldir
!equals(_PRO_FILE_PWD_, $$OUT_PWD) { !equals(_PRO_FILE_PWD_, $$OUT_PWD) {
copy_qmldir.target = $$OUT_PWD/qmldir copy_qmldir.target = $$OUT_PWD/qmldir

View File

@@ -1329,12 +1329,12 @@ QString QmakePriFileNode::varNameForAdding(const QString &mimeType)
return QLatin1String("FORMS"); return QLatin1String("FORMS");
if (mimeType == QLatin1String(ProjectExplorer::Constants::QML_MIMETYPE)) if (mimeType == QLatin1String(ProjectExplorer::Constants::QML_MIMETYPE))
return QLatin1String("OTHER_FILES"); return QLatin1String("DISTFILES");
if (mimeType == QLatin1String(Constants::PROFILE_MIMETYPE)) if (mimeType == QLatin1String(Constants::PROFILE_MIMETYPE))
return QLatin1String("SUBDIRS"); return QLatin1String("SUBDIRS");
return QLatin1String("OTHER_FILES"); return QLatin1String("DISTFILES");
} }
//! //!
@@ -1354,7 +1354,7 @@ QStringList QmakePriFileNode::varNamesForRemoving()
vars << QLatin1String("FORMS"); vars << QLatin1String("FORMS");
vars << QLatin1String("OTHER_FILES"); vars << QLatin1String("OTHER_FILES");
vars << QLatin1String("SUBDIRS"); vars << QLatin1String("SUBDIRS");
vars << QLatin1String("OTHER_FILES"); vars << QLatin1String("DISTFILES");
vars << QLatin1String("ICON"); vars << QLatin1String("ICON");
vars << QLatin1String("QMAKE_INFO_PLIST"); vars << QLatin1String("QMAKE_INFO_PLIST");
return vars; return vars;

View File

@@ -142,7 +142,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
if (!globalHeaderFileName.isEmpty()) if (!globalHeaderFileName.isEmpty())
proStr << "\\\n " << globalHeaderFileName << '\n'; proStr << "\\\n " << globalHeaderFileName << '\n';
if (!pluginJsonFileName.isEmpty()) if (!pluginJsonFileName.isEmpty())
proStr << "\nOTHER_FILES += " << pluginJsonFileName << '\n'; proStr << "\nDISTFILES += " << pluginJsonFileName << '\n';
writeLinuxProFile(proStr); writeLinuxProFile(proStr);
} }
profile.setContents(profileContents); profile.setContents(profileContents);

View File

@@ -165,7 +165,7 @@ bool ProjectFileConverter::convertFile(Core::GeneratedFile &file, QString &error
fileContent.replace(QLatin1String("%HEADERS%"), headers.join(QLatin1String(" \\\n "))); fileContent.replace(QLatin1String("%HEADERS%"), headers.join(QLatin1String(" \\\n ")));
fileContent.replace(QLatin1String("%SOURCES%"), sources.join(QLatin1String(" \\\n "))); fileContent.replace(QLatin1String("%SOURCES%"), sources.join(QLatin1String(" \\\n ")));
fileContent.replace(QLatin1String("%RESOURCES%"), resources.join(QLatin1String(" \\\n "))); fileContent.replace(QLatin1String("%RESOURCES%"), resources.join(QLatin1String(" \\\n ")));
fileContent.replace(QLatin1String("%OTHER_FILES%"), otherFiles.join(QLatin1String(" \\\n "))); fileContent.replace(QLatin1String("%DISTFILES%"), otherFiles.join(QLatin1String(" \\\n ")));
fileContent.replace(QLatin1String("%PROJECT_NAME%"), convertedProjectContext().projectName()); fileContent.replace(QLatin1String("%PROJECT_NAME%"), convertedProjectContext().projectName());
fileContent.replace(QLatin1String("%TARGET%"), origProjectVariables.value(QLatin1String("TARGET"), fileContent.replace(QLatin1String("%TARGET%"), origProjectVariables.value(QLatin1String("TARGET"),
convertedProjectContext().projectName())); convertedProjectContext().projectName()));

View File

@@ -41,6 +41,6 @@ SOURCES += \
RESOURCES += \ RESOURCES += \
%RESOURCES% %RESOURCES%
OTHER_FILES += \ DISTFILES += \
bar-descriptor.xml \ bar-descriptor.xml \
%OTHER_FILES% %DISTFILES%