Version: (using KDE Devel) Installed from: Compiled sources QScintilla for Qt4 provide a customwidget for Qt4 designer, I can use it to add a special QScintilla Widget in a Form, then get a ui file include QScintilla Widget. if I use uics to generate the csharp code, it did not add "using QScintilla;" driective automatically. so I had to modify the result by hand. It is not a good idea to modify a intermediate file. So I hacked the uics and add a dirty hack here. dirty but works(uics's codes are also not so clean:-D) diff -Nur qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/cs/cswriteincludes.cpp qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/cs/cswriteincludes.cpp --- qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/cs/cswriteincludes.cpp 2007-06-26 23:24:24.000000000 +0800 +++ qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/cs/cswriteincludes.cpp 2007-08-29 22:52:46.000000000 +0800 @@ -55,7 +55,10 @@ ++it; } } - +void WriteIncludes::addScintilla() +{ + output << "using QScintilla;\n\n"; +} void WriteIncludes::acceptUI(DomUI *node) { /* m_includes.clear(); diff -Nur qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/cs/cswriteincludes.h qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/cs/cswriteincludes.h --- qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/cs/cswriteincludes.h 2007-06-26 23:24:24.000000000 +0800 +++ qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/cs/cswriteincludes.h 2007-08-29 22:52:46.000000000 +0800 @@ -39,6 +39,7 @@ WriteIncludes(Uic *uic); void acceptUI(DomUI *node); + void addScintilla(); void acceptWidget(DomWidget *node); void acceptLayout(DomLayout *node); void acceptSpacer(DomSpacer *node); diff -Nur qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/uic.cpp qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/uic.cpp --- qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/uic.cpp 2007-06-26 23:24:25.000000000 +0800 +++ qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/uic.cpp 2007-08-29 22:52:33.000000000 +0800 @@ -60,6 +60,50 @@ { } +bool Uic::useScintilla() +{ + QString fileName = opt.inputFile; + + QFile f; + if (fileName.isEmpty()) + f.open(stdin, QIODevice::ReadOnly); + else { + f.setFileName(fileName); + if (!f.open(QIODevice::ReadOnly)) + return false; + } + + QDomDocument doc; // ### generalize. share more code with the other tools! + if (!doc.setContent(&f)) + return false; + + QDomElement root = doc.firstChild().toElement(); + DomUI *ui = new DomUI(); + ui->read(root); + + double version = ui->attributeVersion().toDouble(); + if (version < 4.0) { + delete ui; + + fprintf(stderr, "uic: File generated with too old version of Qt Designer\n"); + return false; + } + + if (DomCustomWidgets *customWidgets = ui->elementCustomWidgets()) { + foreach (DomCustomWidget *customWidget, customWidgets->elementCustomWidget()) { + if (DomHeader *header = customWidget->elementHeader()) { + QString file = header->text(); + if (file.isEmpty()) + continue; + if(file.contains("scintilla")) + return true; + } + } + } + delete ui; + return false; +} + bool Uic::printDependencies() { QString fileName = opt.inputFile; @@ -201,6 +245,8 @@ info.acceptUI(ui); cWidgetsInfo.acceptUI(ui); WriteIncludes(this).acceptUI(ui); + if(useScintilla()) + WriteIncludes(this).addScintilla(); Validator(this).acceptUI(ui); diff -Nur qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/uic.h qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/uic.h --- qt4-qyoto-1.0.0/csharp/qyoto/tools/uics/uic.h 2007-06-26 23:24:24.000000000 +0800 +++ qt4-qyoto-1.0.0new/csharp/qyoto/tools/uics/uic.h 2007-08-29 22:52:33.000000000 +0800 @@ -49,6 +49,7 @@ ~Uic(); bool printDependencies(); + bool useScintilla(); inline Driver *driver() const { return drv; }
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? Thank you for helping us make KDE software even better for everyone!
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!