MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / ctxMenuImageFromFileOnClick

Method ctxMenuImageFromFileOnClick

src/widgets/SimpleChatTab.cpp:191–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189 }
190
191 void SimpleChatTab::ctxMenuImageFromFileOnClick() {
192 QString filename = QFileDialog::getOpenFileName(this, tr("Select an Image to Send"), QString(), tr("Images (*.png *.jpg)"));
193 if (!filename.isNull() && !filename.isEmpty()) {
194 QFile imageFile(filename);
195 if (imageFile.open(QFile::ReadOnly)) {
196 prepareAndSendImage(imageFile.readAll());
197 } else {
198 QMessageBox::warning(this, tr("Error loading image"), tr("Could not open selected image.\nInsufficient rights or I/O error."), QMessageBox::Ok, QMessageBox::NoButton);
199 }
200 }
201 }
202
203 void SimpleChatTab::ctxMenuImageFromUrlOnClick() {
204 bool ok = false;

Callers

nothing calls this directly

Calls 2

isEmptyMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected