Initial qml root window

This commit is contained in:
Nicolas Werner 2022-01-12 19:09:46 +01:00
parent 9a2e07cbce
commit b106eafb0e
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
21 changed files with 426 additions and 397 deletions

View file

@ -266,8 +266,8 @@ void
InputBar::openFileSelection()
{
const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
const auto fileName = QFileDialog::getOpenFileName(
ChatPage::instance(), tr("Select a file"), homeFolder, tr("All Files (*)"));
const auto fileName =
QFileDialog::getOpenFileName(nullptr, tr("Select a file"), homeFolder, tr("All Files (*)"));
if (fileName.isEmpty())
return;
@ -659,7 +659,7 @@ InputBar::command(const QString &command, QString args)
void
InputBar::showPreview(const QMimeData &source, const QString &path, const QStringList &formats)
{
auto *previewDialog_ = new dialogs::PreviewUploadOverlay(ChatPage::instance());
auto *previewDialog_ = new dialogs::PreviewUploadOverlay(nullptr);
previewDialog_->setAttribute(Qt::WA_DeleteOnClose);
// Force SVG to _not_ be handled as an image, but as raw data