Hi @convexbytes !
This is something I do... a lot. However, I break my project into libraries (both shared and static) and use common names all the time. I have not had problems so far.
Now, what I do have problems with is QtCreate can get confused sometime on the correct file to reference in the debugger and code completion. This is much better in 4.9 if I am patient and wait a moment.
My typical usage is in plugins. I am a creature of habit. My plugin main interface is typically called PluginMain. Resides in PluginMain.cpp/PluginMain.h. May or may not reside in different namespaces. I have never had a problem building my projects.
The MOC generator typically uses the namespace in the name mangling. Here is a small sample (my namespace in this case is 'i3k'):
/****************************************************************************
** Meta object code from reading C++ file 'PositionView.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../../../../../src/display/PositionView.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'PositionView.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.12.3. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_i3k__PositionView_t {
QByteArrayData data[8];
char stringdata0[82];
};
#define QT_MOC_LITERAL(idx, ofs, len)
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len,
qptrdiff(offsetof(qt_meta_stringdata_i3k__PositionView_t, stringdata0) + ofs
- idx * sizeof(QByteArrayData))
)
static const qt_meta_stringdata_i3k__PositionView_t qt_meta_stringdata_i3k__PositionView = {
{
QT_MOC_LITERAL(0, 0, 17), // "i3k::PositionView"
QT_MOC_LITERAL(1, 18, 11), // "on_postData"
QT_MOC_LITERAL(2, 30, 0), // ""
QT_MOC_LITERAL(3, 31, 8), // "PRawGNSS"
QT_MOC_LITERAL(4, 40, 3), // "gps"
QT_MOC_LITERAL(5, 44, 9), // "PPosition"
QT_MOC_LITERAL(6, 54, 8), // "position"
QT_MOC_LITERAL(7, 63, 18) // "on_settingsChanged"
},
"i3k::PositionView\0on_postData\0\0PRawGNSS\0"
"gps\0PPosition\0position\0on_settingsChanged"
};
#undef QT_MOC_LITERAL