...
 
Commits (11)
......@@ -270,7 +270,8 @@ Core::init() {
connect( coreWidget_->logWidget_->openMeshFilterAction_,SIGNAL(toggled(bool)), this, SLOT(enableOpenMeshErrorLog(bool)) );
QRect rect = QApplication::desktop()->screenGeometry();
QScreen *screen = QGuiApplication::primaryScreen();
QRect rect = screen->geometry();
uint width = rect.width();
if ( width > 1000 ) {
......
......@@ -316,8 +316,12 @@ void Core::loadPlugins()
* Remove static plugins from dynamically loaded list.
*/
{
QSet<QString> staticPlugins = QSet<QString>::fromList(
QString::fromUtf8(cmake::static_plugins).split("\n"));
QStringList list = QString::fromUtf8(cmake::static_plugins).split("\n");
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QSet<QString> staticPlugins = QSet<QString>(list.begin(),list.end());
#else
QSet<QString> staticPlugins = QSet<QString>::fromList(list);
#endif
for (int i = 0; i < pluginlist.size(); ) {
const QString bn = QFileInfo(pluginlist[i]).fileName();
if (staticPlugins.contains(bn)) {
......
......@@ -590,7 +590,7 @@ QSurfaceFormat createFormat(QSurfaceFormat::OpenGLContextProfile _profile, int _
if(_profile != QSurfaceFormat::CoreProfile)
format.setOption(QSurfaceFormat::DeprecatedFunctions);
if (_debugContext)
format.setOption(format.options() | QSurfaceFormat::DebugContext);
format.setOption(QSurfaceFormat::DebugContext);
return format;
}
......@@ -739,7 +739,6 @@ int main(int argc, char **argv)
// OpenGL check
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
QApplication::setColorSpec( QApplication::CustomColor );
// Try creating a valid OpenGL context
/******************************/
......
......@@ -303,7 +303,7 @@ void QtWheel::redrawPixmap() {
QPainter paint;
paint.begin( &pixmap_);
pixmap_.fill( palette().background().color() );
pixmap_.fill( palette().window().color() );
// coords of wheel frame
QRect contents = contentsRect();
......
......@@ -504,10 +504,14 @@ void CoreWidget::applicationSnapshotDialog() {
OpenFlipperSettings().setValue("Core/CurrentDir", QFileInfo(newName).absolutePath() );
snapshotName_ = newName;
dialog.hide();
//grabs only the widget (espacially in windows)
//todo: deprecated in QT 5.0, use QScreen instead
QPixmap pic = QPixmap::grabWindow( winId() );
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QScreen* screen = window()->screen();
QPixmap pic = screen->grabWindow( winId() );
#else
QPixmap pic = QPixmap::grabWindow( winId() );
#endif
QPainter painter (&pic);
......@@ -534,8 +538,16 @@ void CoreWidget::applicationSnapshotDialog() {
///Take a snapshot of the whole application
void CoreWidget::applicationSnapshot() {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QScreen* screen = window()->screen();
QPixmap pix = screen->grabWindow( winId() );
#else
QPixmap pix = QPixmap::grabWindow( winId() );
#endif
// Write image asynchronously
QImage* pic = new QImage(QPixmap::grabWindow( winId() ).toImage());
QImage* pic = new QImage( pix.toImage() );
writeImageAsynchronously(pic, suggestSnapshotFilename(snapshotName_));
}
......
......@@ -231,7 +231,7 @@ void HelpWidget::linkActivated(const QUrl& _url) {
void HelpWidget::startSearch() {
searchEngine_->search(searchEngine_->queryWidget()->query());
searchEngine_->search(searchEngine_->queryWidget()->searchInput());
}
void HelpWidget::setHomeSite(const QString& _homeSite) {
......
......@@ -217,7 +217,7 @@ void PostProcessorDialog::slotMovePostProcessor(unsigned _from,unsigned _to)
QFrame* frame = createFrame(*postProcessorManager()[activeRowToRow_[_from]]);
activeItem->setSizeHint(frame->sizeHint());
activeList->setItemWidget(activeItem,frame);
activeList->setItemSelected(activeItem,true);
activeItem->setSelected(true);
//swap postprocessor
const int chainPos = _from;
......